http://www.perlmonks.org?node_id=769946

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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Weird error log message
by ikegami (Patriarch) on Jun 09, 2009 at 15:37 UTC

    All those errors are safe to ignore. The server didn't log anything about your script's failure! Your server's logging is incomplete.

    On getting a request,

    1. Your script dies (Nothing logged!!!)
    2. Your server is configured to return 500.shtml when a 500 error occurs, but you didn't create it (harmless). So the web server logs this error and generates a 404 for 500.shtml.
    3. Your server is configured to return 404.shtml when a 404 error occurs, but you didn't create it (harmless). So the web server logs this and returns the default error message.

    Since you can't rely on the server logs, you'll need to use

    use CGI::Carp qw( fatalsToBrowser );
      Thank you ikegami, now tis clear to me what the server error log mean and really i didnt knew up until now that iam supposed to specify custom error logs, i though server was setup in a way to provide fixed error messages.

      As for the Carp module i'm already using it in all my perl files, including index.pl, so i dont have to log to cpanel every time to check the error log.

      it seems to me though that the runtime of index.pl never reaches the stage of carp module. which is my 2nd line in row, because if it did i would get a proper perl error message. So i still dont see why iam gettign these error messages, which as you say are safe to ignore, and why my script dies instanly without some king of perl error message.

      When something like this happened to me *locally* it was because i didnt had a proper shebang constructor, sicne iam on a vista machine, because i uplaod to a unix one. When i fixex that it worked and gave me perl error messages, but in this case the shebang constructo is correct, so then why it aint producing perl error messages? Does the script try to run at all? anf if yes why die instantly?

        As for the Carp module i'm already using it in all my perl files, including index.pl, so i dont have to log to cpanel every time to check the error log.

        Carp is a different module. I'm assuming you mean CGI::Carp and more specifically, its fatalsToBrowser functionality.

        it seems to me though that the runtime of index.pl never reaches the stage of carp module.

        use statements are executed as soon as they are compiled, so the "runtime of index.pl" is moot.

        So i still dont see why iam gettign these error messages, which as you say are safe to ignore,

        Because the browser was told to look for those files and they don't exist.

        so then why it aint producing perl error messages? Does the script try to run at all?

        All I know is that your browser isn't logging everything it should. It should have logged an error message even if your script had died instantly (saying it couldn't find the CGI headers).

Re: Weird error log message
by marto (Cardinal) on Jun 09, 2009 at 15:33 UTC

    You can't just copy and paste an error message rather than ask us to view some screen shot (the domain blocked by my employers)? What have you tried to resolve the issue? Did you search the web before posting here? Perhaps paying for support is an option if you don't want to have to search for the solutions to problems?

    "Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

    This suggests to me that the ErrorDocument issue is in "Addition" to your internal server error.

    You have been posting here and on other forums for years, you know the routine, (hint: How do I post a question effectively?).

    Martin

Re: Weird error log message
by Anonymous Monk on Jun 09, 2009 at 15:22 UTC