apache and cgi problems
Moderator: General Moderators
apache and cgi problems
hi i have a fresh fedora core 1 install and apache is running fine, I put a hello world cgi in the cgi-bin and I cant get it to do anything i checked the error logs and it says Premature end of script headers
checked exe permisions on files and folders
anyone have any suggestions??
checked exe permisions on files and folders
anyone have any suggestions??
I don't know much about fedora however, have you checked the usual suspects...
Has the cgi-bin been configured correctly within the apache config file.
Have you specified the correct path to the interpretor as the fist line of your script.
Have you checked the permissions of the script file you are trying to run e.g. it is executable.
If I remember correctly, the standard fedora apache install runs with suexec. If that is the case, apache will not run scripts that are group or world writeable. Also, apache will not run scripts that are owned by root (although I think the behaviour is that apache will still try to run but with whatever user apache is running as.
Has the cgi-bin been configured correctly within the apache config file.
Have you specified the correct path to the interpretor as the fist line of your script.
Have you checked the permissions of the script file you are trying to run e.g. it is executable.
If I remember correctly, the standard fedora apache install runs with suexec. If that is the case, apache will not run scripts that are group or world writeable. Also, apache will not run scripts that are owned by root (although I think the behaviour is that apache will still try to run but with whatever user apache is running as.
I would change the owner/group of the scripts to a standard user.
suexec should show up in your error log something like "suEXEC mechanism enabled" and probably a path to the executable. If it's not mentioned in the logs you should probably just double check for the file, you should be able to search the file system for suexec (it should be in apache's sbin directory (sorry I don't know where that is on fedora)).
If apache is installed at /usr/local/apache then it will be in /usr/local/apache/sbin other possibles are /sbin or /usr/sbin
suexec should show up in your error log something like "suEXEC mechanism enabled" and probably a path to the executable. If it's not mentioned in the logs you should probably just double check for the file, you should be able to search the file system for suexec (it should be in apache's sbin directory (sorry I don't know where that is on fedora)).
If apache is installed at /usr/local/apache then it will be in /usr/local/apache/sbin other possibles are /sbin or /usr/sbin