die, was (Re: CGI email)

Sander van Zoest sander at mp3.com
Sat Feb 26 00:17:35 CST 2000


~sdpm~
On Fri, 25 Feb 2000, C. Abney wrote:

> > Presumably, you are talking more about the "die" statement's 
> > output.  Yes, the "yipes!" output would NOT make a browser very 
> > happy.  
> wtf???  Where the heck is die printing, anyway?  And why doesn't this
> work like (I think) it should?:

any Carp() will be output to STDERR which in the case of a cgi script the
error log. Any STDOUT by default would go to the web client, although
this might not always be the case (mod_perl might not, unless you
are using Apache::Registry () )

You might want to look into CGI::Carp qw(fatalsToBrower) which is great
on a dev server where you want to see these messages. Alternatively
you can look into the Apache ScriptLog directive to debug your CGI 
scripts. CGI::Carp will provide the appropriate Content-Type header
to make browers happy. 

Usually the server prints a "500 Internal Server Error" status and 
doesn't print your broken script output to the user for security reasons.


For modperl info see http://perl.apache.org/guide/porting.html#die_and_mod_perl

Cheers,
  
- 
Sander van Zoest                                             sander at mp3.com   
High Geek                                                    (858) 623-7442
MP3.com, Inc.  						http://www.mp3.com/
		Your premiere Music Service Provider (MSP) 

~sdpm~

The posting address is: san-diego-pm-list at hfb.pm.org

List requests should be sent to: majordomo at hfb.pm.org

If you ever want to remove yourself from this mailing list,
you can send mail to <majordomo at happyfunball.pm.org> with the following
command in the body of your email message:

    unsubscribe san-diego-pm-list

If you ever need to get in contact with the owner of the list,
(if you have trouble unsubscribing, or have questions about the
list itself) send email to <owner-san-diego-pm-list at happyfunball.pm.org> .
This is the general rule for most mailing lists when you need
to contact a human.




More information about the San-Diego-pm mailing list