Are you sure the whole script isn't running?
I came to the conclusion that the whole script isn't running because the logfile I am writing to with carpout has a few warnings written to it on a successful run but is blank on an error run. Surely the warnings would still be there on an error run if the script was actually running?
I am also getting some strange behaviour that I suspect is due to the file output buffer.
use FindBin qw($RealBin); my $safepath; BEGIN { use CGI::Carp qw(carpout); if ($RealBin =~ m!^(/home/xxx/yyy/(test|uk)/www)!) { $safepath = "$1/../lib"; } else { die "Illegal use of software - visit www.way-finder.uk to use +this site"; } open LOG, '>>', '/home/xxx/yyy/test_error_log.log' or die "Unable +to open error log"; print LOG localtime . " - $ENV{'HTTP_HOST'}\n\n"; carpout(\*LOG); } use lib "$safepath";
During an error running of the script, the logfile gets created but nothing is written to it despite the print in the BEGIN block. During a successful execution, the timestamp in the BEGIN block gets written to the logfile after the warnings even through it shows an earlier timestamp.
Thank you for your suggestions. They give me some things to try. I had run out of ideas!
before trying it live on the server that has the problem
They are one and the same server - just different domains in the same shared hosting. But yes, I will test it well first.
This is why I don't think it is a resource issue as there are other domains on the same hosting that have a lot more traffic and carry out more IO than this site which, apart from loading Perl modules, authenticating with Facebook and connecting to the database, does no IO at all. But I am open to any suggestions.
In reply to Re^3: Errors uncaught by CGI::Carp
by Bod
in thread Errors uncaught by CGI::Carp
by Bod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |