hesco has asked for the wisdom of the Perl Monks concerning the following question:
I've commented out nearly everything, yet this is still what I get. There is already a script running here using DBI, from which I snagged the connection parameters. This passes the perl -wc check on my local sandbox, but when I upload it I get nothing but the browser error reported above. I'm running out of ideas for how to debug this. Any clues would be greatly appreciated.The server encountered an internal error and was unable to complete yo +ur request. Error message: Premature end of script headers: <scriptname>
-- Hugh
UPDATE
Well, that's embarrasing folks. I'm used to scp preserving permissions. Apparently ftp applies a mask to the incoming so folks are more deliberate about how they pass around privileges in the file system. A simple chmod was all it took. I guess it really was about me operating in a new environment. Now I need to go monitor what's happening on my test dataset. Thanks for the feedback.
#!/usr/bin/perl -w use strict; use DBI; # use CGI::Carp qw(fatalsToBrowser); # use lib qw{/public_html/lib}; # use Date::Manip; my $preserve_date = '2006-10-30'; my %registrations; # my $dbh = DBI->connect('dbi:mysql:dbname','userID','secret',{RaiseEr +ror=>1}) or die "no \$dbh: $DBI::errstr"; # ### ALL THE MAIN() LOGIC HAS BEEN COMMENTED OUT! print <<EOF; <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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Debugging without shell access?
by muba (Priest) on Oct 30, 2006 at 16:17 UTC | |
|
Re: Debugging without shell access?
by davorg (Chancellor) on Oct 30, 2006 at 16:16 UTC | |
by Mutant (Priest) on Oct 30, 2006 at 16:54 UTC | |
|
Re: Debugging without shell access?
by blue_cowdawg (Monsignor) on Oct 30, 2006 at 16:45 UTC | |
|
Re: Debugging without shell access?
by dirving (Friar) on Oct 30, 2006 at 16:27 UTC | |
|
Re: Debugging without shell access?
by hesco (Deacon) on Oct 30, 2006 at 16:26 UTC | |
by davorg (Chancellor) on Oct 30, 2006 at 16:27 UTC | |
by jhourcle (Prior) on Oct 30, 2006 at 17:59 UTC | |
by Anonymous Monk on Oct 31, 2006 at 09:53 UTC | |
by jhourcle (Prior) on Oct 31, 2006 at 16:04 UTC | |
|
Re: Debugging without shell access?
by hesco (Deacon) on Oct 30, 2006 at 17:00 UTC | |
by davorg (Chancellor) on Oct 30, 2006 at 17:04 UTC | |
by Melly (Chaplain) on Oct 30, 2006 at 17:17 UTC | |
by derby (Abbot) on Oct 30, 2006 at 17:47 UTC | |
by Melly (Chaplain) on Oct 30, 2006 at 23:04 UTC | |
|
Re: Debugging without shell access?
by fenLisesi (Priest) on Oct 31, 2006 at 07:11 UTC |