System error
| error: |
Can't call method "prepare" on an undefined value at /home/mc2/public_html/umt/webgen/update_counter.html line 14.
|
| context: |
| ... |
|
| 10: |
|
| 11: |
if ($page_id =~ /\d{2,6}/) { |
| 12: |
|
| 13: |
#update viewed times |
| 14: |
my $sth = $dbh->prepare("UPDATE webpages SET hits=hits+1 WHERE pageid = ? "); |
| 15: |
$sth->execute($page_id) || die "can't execute sth : $!"; |
| 16: |
|
| 17: |
|
| 18: |
my $sql = "SELECT hits FROM webpages WHERE pageid = ? "; |
| ... |
|
|
| code stack: |
/home/mc2/public_html/umt/webgen/update_counter.html:14
|
raw error
Can't call method "prepare" on an undefined value at /home/mc2/public_html/umt/webgen/update_counter.html line 14.
Trace begun at /usr/share/perl5/HTML/Mason/Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('Can\'t call method "prepare" on an undefined value at /home/mc2/public_html/umt/webgen/update_counter.html line 14.^J') called at /home/mc2/public_html/umt/webgen/update_counter.html line 14
HTML::Mason::Commands::__ANON__('counter_format', 'white', 'page_id', 11921) called at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x1679340)', 'counter_format', 'white', 'page_id', 11921) called at /usr/share/perl5/HTML/Mason/Request.pm line 1257
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1252
HTML::Mason::Request::comp(undef, undef, undef, 'counter_format', 'white', 'page_id', 11921) called at /usr/share/perl5/HTML/Mason/Request.pm line 466
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 466
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 418
HTML::Mason::Request::exec('MasonX::Request::WithApacheSession=HASH(0x166b0b0)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 165
HTML::Mason::Request::ApacheHandler::exec('MasonX::Request::WithApacheSession=HASH(0x166b0b0)') called at /usr/share/perl5/MasonX/Request/WithApacheSession.pm line 130
MasonX::Request::WithApacheSession::exec('MasonX::Request::WithApacheSession=HASH(0x166b0b0)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 832
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0xb9f130)', 'Apache=SCALAR(0x1615e10)') called at /etc/apache-perl/handler.pl line 93
HTML::Mason::handler('Apache=SCALAR(0x1615e10)') called at /dev/null line 0
eval {...} at /dev/null line 0