Hello all,

Well after I finally got DBI installed on Mac OS X I made a quick test script. I then tested it out from the terminal and debugged it. It works! I then tried it on my Apache server, same system same database. This time, however I get a 500 error. In the error log I see this line:

[Tue Apr 12 05:34:26 2005] [error] [client 24.238.83.11] malformed header from script. Bad header=11, 2004, 13, Salt and Pepper : /Library/WebServer/CGI-Executables/useDB.cgi

Here is the script I am testing:

#!/usr/bin/perl -w
use Time::localtime;
use Time::Local;
use CGI qw(:standard);
use strict;
use File::stat;
use DBI;
my $dbh = DBI->connect("DBI:mysql:test",'myUser','myPass',{RaiseError=>1}) or print "connecting: $DBI::errstr\n";
my $selectStm = $dbh->prepare("SELECT * FROM churchEvents WHERE eventMonth = '11' AND eventYear = '2004'");
$selectStm->execute;
my @row;
while((@row)=$selectStm->fetchrow){
print join(", ",map{defined $_ ? $_:"(null)"[EMAIL PROTECTED],"\n");
}
$selectStm->finish;
$dbh->disconnect;



Anyone know where to start looking? I have even tried re-writing the script in case I hade a stray hidden character in the original.


Thanks,

Bruce Martin
The Martin Solution
PO Box 644
Delaware Water Gap, PA
(570) 421-0670
[EMAIL PROTECTED]



Reply via email to