System error

error:  Can't call method "prepare" on an undefined value at /home/count/www/fridge.genericorp.net/public_html/fridge.html line 252.
context: 
... 
248:  }
249:  ############################################################################
250: 
251:  my $sql = "SELECT * from fridge_magnets fm, magnets m where fm.magnet_id = m.magnet_id and fm.fridge_id = ? and m.active = 1 order by fm.last_moved desc";
252:  my $sth = $dbh->prepare($sql) or die $dbh->errstr;
253:  $sth->execute($fridge_id) or die $sth->errstr;
254:  while(my $result = $sth->fetchrow_hashref) {
255:  push @magnets, $result;
256:  }
... 
code stack:  /home/count/www/fridge.genericorp.net/public_html/fridge.html:252
/home/count/www/fridge.genericorp.net/public_html/autohandler:48
raw error






























Can't call method "prepare" on an undefined value at /home/count/www/fridge.genericorp.net/public_html/fridge.html line 252.


Trace begun at /usr/local/apache1.3/perl/lib/site_perl/5.12.4/HTML/Mason/Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('Can\'t call method "prepare" on an undefined value at /home/count/www/fridge.genericorp.net/public_html/fridge.html line 252.^J') called at /home/count/www/fridge.genericorp.net/public_html/fridge.html line 252
HTML::Mason::Commands::__ANON__ at /usr/local/apache1.3/perl/lib/site_perl/5.12.4/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x9c89268)') called at /usr/local/apache1.3/perl/lib/site_perl/5.12.4/HTML/Mason/Request.pm line 1302
eval {...} at /usr/local/apache1.3/perl/lib/site_perl/5.12.4/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/local/apache1.3/perl/lib/site_perl/5.12.4/HTML/Mason/Request.pm line 955
HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0x9c95ab0)') called at /home/count/www/fridge.genericorp.net/public_html/autohandler line 48
HTML::Mason::Commands::__ANON__ at /usr/local/apache1.3/perl/lib/site_perl/5.12.4/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x9701078)') called at /usr/local/apache1.3/perl/lib/site_perl/5.12.4/HTML/Mason/Request.pm line 1297
eval {...} at /usr/local/apache1.3/perl/lib/site_perl/5.12.4/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/local/apache1.3/perl/lib/site_perl/5.12.4/HTML/Mason/Request.pm line 481
eval {...} at /usr/local/apache1.3/perl/lib/site_perl/5.12.4/HTML/Mason/Request.pm line 481
eval {...} at /usr/local/apache1.3/perl/lib/site_perl/5.12.4/HTML/Mason/Request.pm line 433
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0x9c95ab0)') called at /usr/local/apache1.3/perl/lib/site_perl/5.12.4/HTML/Mason/ApacheHandler.pm line 168
HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0x9c95ab0)') called at /usr/local/apache1.3/perl/lib/site_perl/5.12.4/HTML/Mason/ApacheHandler.pm line 825
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x9253d90)', 'Apache=SCALAR(0x9bd3ac0)') called at /home/count/www/fridge.genericorp.net/etc/mason_init.pl line 28
PublicFridge::ApacheHandler::handler('Apache=SCALAR(0x9bd3ac0)') called at /dev/null line 0
eval {...} at /dev/null line 0