FAQ
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)"}@row,"\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
bruce@martinsolution.com

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupdbi-users @
categoriesperl
postedApr 12, '05 at 9:39a
activeApr 12, '05 at 10:02a
posts3
users2
websitedbi.perl.org

2 users in discussion

Bruce Martin: 2 posts Thilo Planz: 1 post

People

Translate

site design / logo © 2022 Grokbase