in reply to Debugging without shell access?

Thanks for the leads folks.

OK, I've pared this one down as far as it can go, yet I still get the same "Premature end of script headers" errors. I also tried it using CGI, which I figured knows the html spec better than I ever will. Any further ideas?

#!/usr/bin/perl -w use strict; my $preserve_date = '2006-09-01'; my %registrations; print <<EOF; Content-type: text/html <html> <head> <title>Masking Private Data</title> </head> <body> <h2>Masking Private Data</h2> This script is masking private data in the test data set with a depart +ure date before $preserve_date. Records related to later events are +being preserved.<p> </body> </html> EOF 1; sub parse_date { my ($date_str) = @_; my $date = ParseDate($date_str); $date = substr($date,0,4) . '-' . substr($date,4,2) . '-' . substr($ +date,6,2); return $date; }
if( $lal && $lol ) { $life++; }

Replies are listed 'Best First'.
Re^2: Debugging without shell access?
by davorg (Chancellor) on Oct 30, 2006 at 17:04 UTC

    See, this is why you really need access to the server logs. And the Apache configuration files.

    Is the server running suexec? And, if so, are are file ownership and permissions correct?

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

Re^2: Debugging without shell access?
by Melly (Chaplain) on Oct 30, 2006 at 17:17 UTC

    Where is ParseDate defined? Don't you need to include Date::Manip or something?

    Like others, I'm still confused by you saying you tested this on a local environment - that script would never have worked running under apache/cgi - did you just capture the output to file and open the file in a browser? That is not the same thing...

    <update>I've just noticed - you've commented out Date::Manip, but you are still using ParseDate in your code. Fix that and try again...</update>

    Tom Melly, tom@tomandlu.co.uk

      That shouldn't be a problem since parse_date is never called.

      -derby

        True - I noticed shortly after I posted. OP, could your shebang be wrong?

        Tom Melly, tom@tomandlu.co.uk