How to set the message displayed when a Perl Script failscompilation?

Discussion in 'Perl Misc' started by Nigel, Mar 15, 2009.

  1. Nigel

    Nigel Guest

    Hi all,

    I'm sure this is glaringly obvious to those in the know, but my
    efforts to find the answer have failed.

    My problem is with the message that is displayed in a web browser when
    a script fails compilation. At the moment I'm getting this:

    For help, please send mail to the webmaster ([no address given]),
    giving this error message and the time and date of the error.

    At least, I'd like to know how to set the email address for the
    webmaster instead of no address given.

    Ideally I'd like to handle the failed compilation in some way that
    would allow me to display a friendly page to my visitor and send me an
    email to alert me to the problem.

    Has anyone got any ideas? Apart that is from not uploading scripts
    that don't compile! ;-)

    Thanks in advance,

    Nigel
     
    Nigel, Mar 15, 2009
    #1
    1. Advertising

  2. Re: How to set the message displayed when a Perl Script fails compilation?

    Nigel <> wrote in news:85b78e80-10b5-480f-a83f-
    :

    > Ideally I'd like to handle the failed compilation in some way that
    > would allow me to display a friendly page to my visitor and send me an
    > email to alert me to the problem.
    >
    > Has anyone got any ideas?


    Maybe you should read the documentation for the HTTP server you are using.

    Sinan
    --
    A. Sinan Unur <>
    (remove .invalid and reverse each component for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://www.rehabitation.com/clpmisc/
     
    A. Sinan Unur, Mar 15, 2009
    #2
    1. Advertising

  3. Nigel wrote:
    > My problem is with the message that is displayed in a web browser when
    > a script fails compilation. At the moment I'm getting this:
    >
    > For help, please send mail to the webmaster ([no address given]),
    > giving this error message and the time and date of the error.
    >
    > At least, I'd like to know how to set the email address for the
    > webmaster instead of no address given.
    >
    > Ideally I'd like to handle the failed compilation in some way that
    > would allow me to display a friendly page to my visitor and send me an
    > email to alert me to the problem.
    >
    > Has anyone got any ideas? Apart that is from not uploading scripts
    > that don't compile! ;-)


    Assuming Apache, this might be helpful:
    http://httpd.apache.org/docs/2.0/mod/core.html#errordocument

    Redirect to another script (that compiles...) and have it both send an
    email alert to you and print a friendly message.

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
     
    Gunnar Hjalmarsson, Mar 15, 2009
    #3
  4. Hi, I don't know if this is going to help you....but read up on
    fatalsToBrowser ...
     
    Krishna Chaitanya, Mar 15, 2009
    #4
  5. Gunnar Hjalmarsson wrote:
    > Krishna Chaitanya wrote:
    >> Hi, I don't know if this is going to help you....but read up on
    >> fatalsToBrowser ...

    >
    > That feature
    >
    > 1) might reveal sensitive information,


    What kind? The only sensitive information I've seen it reveal is "Hey,
    this programmer is clueless." No one, other than a clueless
    programmer, would think this info hard to obtain by means other than
    fatalsToBrowser.


    >
    > 2) does typically not display "a friendly page" to a visitor, and


    Right. And the user unfriendly message it typically displays might very
    well be the very message the OP is currently seeing. So he might want
    to read up on it.

    >
    > 3) does not alert the script author if the error happens when a visitor
    > uses the script.


    It can be made to.

    Xho
     
    Xho Jingleheimerschmidt, Mar 17, 2009
    #5
  6. On 2009-03-17 02:11, Xho Jingleheimerschmidt <> wrote:
    > Gunnar Hjalmarsson wrote:
    >> Krishna Chaitanya wrote:
    >>> Hi, I don't know if this is going to help you....but read up on
    >>> fatalsToBrowser ...

    >>
    >> That feature
    >>
    >> 1) might reveal sensitive information,

    >
    > What kind? The only sensitive information I've seen it reveal is "Hey,
    > this programmer is clueless."


    Authentication credentials.
    Hash seeds (I think the recent typo3 exploit used this).
    Non-public file names.
    ....

    Often you want this kind of information in an error log so that you can
    reproduce the error. So you might include them in a die(). But revealing
    them to the user would be a bad idea.

    hp
     
    Peter J. Holzer, Mar 17, 2009
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wet Basement
    Replies:
    1
    Views:
    2,536
    BobMonk
    Jul 15, 2003
  2. dpackwood
    Replies:
    3
    Views:
    1,824
  3. boney
    Replies:
    1
    Views:
    573
  4. stew dean
    Replies:
    58
    Views:
    498
    Helgi Briem
    Oct 30, 2003
  5. Lim kiang Leng
    Replies:
    3
    Views:
    217
    Ben Morrow
    Jul 18, 2004
Loading...

Share This Page