Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

perl cgi redirect to php???

Status
Not open for further replies.

BobMCT

IS-IT--Management
Sep 11, 2000
756
US
Guru's;

We are in the process of rewriting our web site from perl into php for various reasons. My question relates to handling all our customers' links to our perl code, extracting a parameter and redirecting to the php script with the parameter all under SSL.

Here in an example of the incoming URL:


where 123 is the "PATH_INFO" which is referenced by the script.

I am planning on replacing it with a very short perl script with the same name that would output the following to the browswer:

Location:
which would start the php script and pass the extracted value to it.

I've tried this but upon execution I keep getting a 404 message stating that the program is NOT found in the current directory.

Well, in fact it is and the permissions are correct along with the owner and group values (redhat linux).

Has anyone been up against this conversion before using my planned approach and if so how did it work and were there any difficulties you had to overcome?

Please advise because any recommendations and/or suggestions would be greatly appreciated.

Bob
 
Webserver, OS, CGI-BIN location please
--Paul
 
redhat 8.0
apache 2.0.40
php 4.2.2

because ALL html output is dynamically generated all the scripts are in the doc home for the virtual server.
 
Is this configured as a cgi-bin directory on the server

--Paul
 
Well, the directory has ExecCGI permissions on it and both perl and php scripts execute WITHOUT the additional path info appended. However, its NOT a unique /cgi-bin/ location.
 
You are parseing the incomming URL in the abc123.php file, yes? And thenyou do have a case for
Code:
if($xxx = '')
?
 
Solution:

I had to add the AcceptPathInfo On directive to my httpd.conf file and then it worked just fine. Funny, though, it worked without this for perl.cgi's.

Thanks for the assistance.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top