pravi has asked for the wisdom of the Perl Monks concerning the following question:

I experience the following error can anyone help me ?
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, support@portland.co.uk and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
How can I get the server error log ?
the library I use for parsing is cgi-lib.pl from cgi-lib.berkeley.edu
praveen

20030802 Edit by jeffa: Changed title from 'The error'

Replies are listed 'Best First'.
Re: Finding webserver error log
by valdez (Monsignor) on Aug 02, 2003 at 09:30 UTC
Re: Finding webserver error log
by tachyon (Chancellor) on Aug 02, 2003 at 11:48 UTC

    The apache error log location varies. If you have a fully blown server it is probably at:

    /var/log/httpd/error_log # or perhaps /usr/local/apache/var/log/httpd/error_log # to see the error do tail -n10 /var/log/httpd/error_log # this gives you the last 10 lines

    If you are in a virtual server environment the logs may be there (you may or may not have access) or the sysadmin may have given you personal logs somewhere.

    Try reading the CGI Help Guide and follow the suggestions ie add the BEGIN block with the header and the 'fatalsToBrowser' bit. This should get the error into your browser window as well as the logs.

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Re: Finding webserver error log
by sgifford (Prior) on Aug 02, 2003 at 16:16 UTC
    A technique that I've posted before is to write a short shell-script wrapper for your script. That will allow you to see whatever errors would normally go into the error log.
    #!/bin/sh -x
    
    printf "Content-type: text/plain\n\n"
    exec 2>&1
    
    ./yourscript.cgi
    echo "Exited with status $?"
    
    Some hosting providers don't provide access to the error log, and with others it's enough of a pain that this is easier.
Re: Finding webserver error log
by bobn (Chaplain) on Aug 02, 2003 at 15:02 UTC

    For apache on linux I use:

    
    ll -trd `locate error_log`
    
    

    If you have more than one file names 'error_log', the last one listed is most likely the one you want as it it the one most recently written. YMMV radcially on a Virtual server. system, however.

    Other *nix systems may not have locate. ll is an alias for ls -l.

    --Bob Niederman, http://bob-n.com
Re: Finding webserver error log
by skyknight (Hermit) on Aug 02, 2003 at 16:38 UTC