Re: Can't call method "prepare" on an undefined value

2007-07-23 Thread Kevin Field
> > My code around line 1059 in MySQLBroker.pm looks like this: > > > > sub _mysql_exec { > > my ($self, $dbcall) = @_; > > my @resultsArray; > > my $count=0; > > my $sth = $self->{_dbh}->prepare("$dbcall"); > > You shouldn't store a $dbh in your objects like this. Apache::DBI > will chec

Re: Can't call method "prepare" on an undefined value

2007-07-22 Thread Perrin Harkins
On 7/22/07, Dustin D. <[EMAIL PROTECTED]> wrote: 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

Re: Can't call method "prepare" on an undefined value

2007-07-22 Thread Dondi Stroma
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

Re: Can't call method "prepare" on an undefined value

2007-07-22 Thread Foo JH
Does this happen during idle period? MySQL does disconnect when the idle is too long. Dustin D. wrote: 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 conf