Greetings. I am running Apache 1.3.9 and am having a great deal of trouble in getting CGI scripts to run. I am constantly getting the "500 Internal server error" page. The error.log is always saying exec failed because the file or dirtory does not exist. E.G.
[Sun Apr 14 06:56:03 2002] [error] (2)No such file or directory: exec of /usr/lib/cgi-bin/test.cgi failed
[Sun Apr 14 06:56:03 2002] [error] [client 192.168.0.1] Premature end of script headers: /usr/lib/cgi-bin/test.cgi
I even made it so my DocumentRoot (/var/www) could execute CGI scripts but I still get the same error message, of course pertaining to /var/www. The script I'm testing is fine because it prints out HTML when I run it from the shell.
The pertinent lines from my conf files are:
srm.conf:
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
AddHandler cgi-script .cgi .pl
access.conf:
<Directory /cgi-bin/>
AllowOverride None
Options ExecCGI FollowSymLinks
Allow from all
</Directory>
HTTPD runs itself as User: " & Group: " does that mean the cgi-bin directory and scripts have to be owned by and in the group (In any case I've tried changing owner and group but no joy!!) When I type "which perl" I get back "/usr/bin/perl" which is what I have at the top of my test.cgi script. Also my cgi-bin directory and test script has been chmoded to 777.
I've ploughed through many of the old posts relating to running CGI scripts but can't find anything that gives me a possible answer to this problem. I believe I must be missing something fairly basic because there doesn't seem to be all that much to getting CGI running on APACHE and everything looks ok to me! Could anyone suggest some things to take a look at? Any help would be greatly appreciated!
Thanks
Shodan44
[Sun Apr 14 06:56:03 2002] [error] (2)No such file or directory: exec of /usr/lib/cgi-bin/test.cgi failed
[Sun Apr 14 06:56:03 2002] [error] [client 192.168.0.1] Premature end of script headers: /usr/lib/cgi-bin/test.cgi
I even made it so my DocumentRoot (/var/www) could execute CGI scripts but I still get the same error message, of course pertaining to /var/www. The script I'm testing is fine because it prints out HTML when I run it from the shell.
The pertinent lines from my conf files are:
srm.conf:
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
AddHandler cgi-script .cgi .pl
access.conf:
<Directory /cgi-bin/>
AllowOverride None
Options ExecCGI FollowSymLinks
Allow from all
</Directory>
HTTPD runs itself as User: " & Group: " does that mean the cgi-bin directory and scripts have to be owned by and in the group (In any case I've tried changing owner and group but no joy!!) When I type "which perl" I get back "/usr/bin/perl" which is what I have at the top of my test.cgi script. Also my cgi-bin directory and test script has been chmoded to 777.
I've ploughed through many of the old posts relating to running CGI scripts but can't find anything that gives me a possible answer to this problem. I believe I must be missing something fairly basic because there doesn't seem to be all that much to getting CGI running on APACHE and everything looks ok to me! Could anyone suggest some things to take a look at? Any help would be greatly appreciated!
Thanks
Shodan44