in reply to Re: Re: Hacking Movable Type
in thread Hacking Movable Type

Reading the logs is an obvious suggestion. CGI::Carp misses some 500 stuff. Try adding this which is pretty robust:

#!/usr/bin/perl BEGIN { $|++; print "Content-type: text/html\n\n"; # this may also help as it will capture STDERR in the browser open STDERR, ">&STDOUT"; use CGI::Carp 'fatalsToBrowser'; } print STDERR "<p>Foo</p>"; print STDOUT "<p>Bar</p>"; # catches almost all errors one way or another # if ( $syntax_error ) { END { print STDERR "Exiting!" }

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re: Re: Re: Re: Hacking Movable Type
by nysus (Parson) on Mar 31, 2003 at 03:13 UTC
    Error logs don't have a detailed message. No line number. Just some generic script warning. Yes warning switch is on. Tried your code above and something similar already but just get a blank screen when there is an error. Nothing in the error log. Thanks, anyway.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop";
    $nysus = $PM . $MCF;
    Click here if you love Perl Monks

      Then sprinkle warns throughout the code (yours and/or Movable Type) to see how far execution does get, so that you can gradually zero in on the culprit. Once you know where it happens, you have a much better chance of finding out what goes wrong.

      Makeshifts last the longest.