--- Jason Purdy <[EMAIL PROTECTED]> wrote:
> I'm working on a web site that's hosted by ValueWeb (not important, but they give
>you CGI access
> but they don't give you access to the error log). So I feel like I'm flying
>(coding) blind
> sometimes. Especially when I get the Internal Server Error. The scripts in
>question are
> inherited code and a bit complicated, so it would be MUCH better to see what's going
>on instead
> of commenting in/out code to track down the problem.
>
> I've tried:
>
> BEGIN {
> open (STDERR, ">>/path/to/error_log"); # also tried ">/path/to/error_log"
>*shrug* ;)
> }
>
> Also added on (thought maybe the output wasn't flushing or something like that):
>
> END {
> close (STDERR);
> }
>
> And that creates a 0-byte file that doesn't have any contents.
>
> My question is: How can I track down what's going on, on this remote server (with
>it's own
> unique setup/environment [it works great on my computer])?
>
> Thanks in advance!
>
> Jason
Here are a couple of things you can check:
1. Top of script:
use CGI::Carp qw/fatalsToBrowser/;
$|++;
That should route many error messages directly from the error log to the browser.
If that
doesn't work, it may mean that your script is not compiling. The second, cryptic,
command will
disable output buffering which should increase the likelyhood of getting *some* output
to the
browser, so long as your script is compiling.
2. Are your permissions set correctly?
3. Does your shebang line point to the Perl interpreter?
Cheers,
Curtis Poe
=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/