in reply to DBI script runs from command line, not from CGI
As usual when a script runs from the command line but not under CGI you have to ask yourself what is different between these two scenarios? A: Permissions. On the command line the script runs as user:you, under CGI it runs with user:nobody and different permissions.
When you say it runs from the command line but not under CGI what do you mean. Browser hangs, no output, wrong output? I have found that CGI::Carp 'fatalsToBrowser' does not catch all errors. As a result I use this in debugging:
BEGIN { $|++; # autoflush buffers; use CGI::Carp 'fatalsToBrowser'; print "Content-type: text/html\n\n"; }
This relaibly gets the errors to the browser and has the added bonus of printing whatever headers your script is sending in plaintext at the top of the window.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: DBI script runs from command line, not from CGI
by dru145 (Friar) on Apr 16, 2002 at 16:16 UTC | |
by tachyon (Chancellor) on Apr 16, 2002 at 16:36 UTC | |
by dru145 (Friar) on Apr 16, 2002 at 20:32 UTC | |
by tachyon (Chancellor) on Apr 16, 2002 at 21:32 UTC |