LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   cgi error log not showing up (https://www.linuxquestions.org/questions/linux-server-73/cgi-error-log-not-showing-up-610641/)

pdavis68 01-02-2008 02:58 PM

cgi error log not showing up
 
I'm running Apache and I added the following to the configuration file:

ScriptLog /var/log/httpd/cgi/cgi_errors_log
ScriptLogBuffer 512
ScriptLogLength 500000

The directory /var/log/httpd/cgi is writeable by anyone

I restarted apache, but when my cgi script (a C program) is executed and I get the 500 Internal Server Error, no log file shows up in /var/log/httpd/cgi

The regular error log simply has "Premature end of scriptheaders: clientreg.cgi"

The CGI works. I mean, I introduced a bug and it's not working at the moment, but it worked prior to introducing the bug, so CGIs do run.

dkm999 01-03-2008 02:51 PM

Apache is touchy about creating log files; try creating the logfile yourself:
Code:

# touch /var/log/httpd/cgi_errors_log
Then make sure that the file permissions are set so that anyone can write into the file, and you ought to see some messages when you execute the CGI script.


All times are GMT -5. The time now is 03:17 AM.