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!

CGI-Perl scripts cause server error 500

Status
Not open for further replies.

badger

Technical User
Apr 26, 2000
1
GB
I have a new Linux 6.x server, and have downloaded Apache_1.3.12. I did a standard &quot;configure&quot;(basic parameters,&quot;enable-module=all&quot; to be safe,&nbsp;&nbsp;nothing clever), &quot;make&quot;, and &quot;make install&quot;. Tidied up the httpd.conf file, and started the server. All worked fine. Tested cgi capability by pointing the browser of a client system at <A HREF=" TARGET="_new"> Test-cgi is a shell script which comes with apache, and delivers a bunch of configuration and status information from the server to the client. This worked as expected. Tried to do the same with a perl chat script, chatpro.cgi, which was in cgi-bin, as was test-cgi. Ensured that chatpro.cgi was chmod 755, but constantly get a server error 500 on the browser. I looked in error_log for apache, and am getting notification that the server could not find the file!! It's there, right next to test-cgi... Thought maybe I had a bad script, so tried a different perl script, but got the same result.To summarise, shell scripts work fine, perl scripts fail. Scripts run fine interactively with same user as sever. Perl is in the right place (&quot;whereis perl&quot; shows the same path as #!/usr/bin/perl).<br>What am I doing wrong??? I have reinstalled twice to be sure I am not missing a trick, but the same thing happens each time
 
Maybe the log file told you that Apache could not find the file, but error 500 means &quot;Internal Server Error&quot;. (Error 404 is &quot;file not found&quot;). Maybe those Perl scripts are looking for other Perl modules.
 
I thing that your server cant find perl.exe <br>-And if you have it, there must be #!path/perl on first row of your script..<br><br><A HREF="mailto:m@sunpont.net">m@sunpont.net</A><br><br>
 
I am getting the same thing on my NT installation:<br><br>(2)No such file or directory: couldn't spawn child process: f:/program files/apache group/apache/cgi-bin/read.cgi<br><br>The path doesn't seem to be helping.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top