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

N

Nigel

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
 
A

A. Sinan Unur

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 <[email protected]>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
 
G

Gunnar Hjalmarsson

Nigel said:
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.
 
K

Krishna Chaitanya

Hi, I don't know if this is going to help you....but read up on
fatalsToBrowser ...
 
X

Xho Jingleheimerschmidt

Gunnar said:
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
 
P

Peter J. Holzer

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top