Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Creating a file in a CGI script...

by perlcgi (Hermit)
on May 20, 2000 at 13:30 UTC ( [id://13874]=note: print w/replies, xml ) Need Help??


in reply to Creating a file in a CGI script...

What's sometimes helpful to debug this type of problem is to monitor the server logs as you use the script. So if its a Unix box and Apache do a tail -f /usr/local/apache/logs/access.log or similiar. If its a busy production server, (maybe you should'nt be using it for devel work), you can always grep for your script.
On NT, if God-help-us, you are using IIS, then logfiles default to \Winnt\system32\LogFiles\W3SVC3\

Replies are listed 'Best First'.
RE: Re: Creating a file in a CGI script...
by perlcgi (Hermit) on May 20, 2000 at 18:08 UTC
    Of course even simpler than monitoring the logs file is to use CGI::carp
    From the CGI::Carp doc:
    By default, error messages are sent to STDERR. Most HTTPD servers direct STDERR to the server's error log. Some applications may wish to keep private error logs, distinct from the server's error log, or they may wish to direct error messages to STDOUT so that the browser will receive them.
      Just put the following line near the start of your file, and you'll receive fatal error messages (from die -- you are using die, aren't you?) in your web browser. No need to tail -f the logs with: use CGI::Carp qw(fatalsToBrowser);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://13874]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found