Where is your DBI "connect" method? Do you have error checking in place in
case the connect fails? If the connect fails, your database handle will be
undef.
Try adding
or die DBI->errstr;
to your connect method as well as the prepare on line 1059.
----- Original Message -----
From: Dustin D.
To: modperl@perl.apache.org
Sent: Sunday, July 22, 2007 11:38 AM
Subject: Can't call method "prepare" on an undefined value
I'm having countless problems with mod_perl and not even sure where to
start. I thought I had mod_perl up and running in my development
environment, so I pushed the new changes + apache configuration out to my
production environment, and immediately began tail -f on the logs.
What I noticed was, most of the time, everything was working fine. But it
seemed like every few minutes, there would be a burst of the following
errors:
Can't call method "prepare" on an undefined value at modules//MySQLBroker.pm
line 1059.\n