Re: modperl/MySQL question
On Tue, 8 Feb 2000, Terry G Lorber II wrote: > DBD::mysql::st execute failed: MySQL server has gone away at slashmod.pm > line 23 [...] > Is this a server problem, a perl problem, or a MySQL problem? Do I need > to adjust a timeout setting somewhere? Sounds like you need Apache::DBI. 1) Enable Apache::DBI either with 'PerlModule Apache::DBI' in httpd.conf or 'use Apache::DBI ();' in your startup.pl. Apache::DBI wraps some DBI methods to maintain persistant connections. 2) For MySQL, you'll need to add a keepalive routine to your startup.pl: sub Apache::DBI::db::ping { my $dbh = shift; return $dbh->do('select 1'); } 3) Also, you may want to increase the mysqld connection timeout in my.cnf: [mysqld] set-variable = wait_timeout=129600 - Matt
modperl/MySQL question
I am trying to implement a SLASH (http://www.slashdot.org) on my server. Whenver I hit a *.pl file from the browser, I get the following erorr message: [Tue Feb 8 17:08:43 2000] [error] [client 192.168.1.2] File does not exist: /ho me/slash/public_html/slashdot.gif DBD::mysql::st execute failed: MySQL server has gone away at slashmod.pm line 23 . DBD::mysql::st execute failed: MySQL server has gone away at slashmod.pm line 23 . DBD::mysql::st execute failed: MySQL server has gone away at slashmod.pm line 23 . DBD::mysql::st execute failed: MySQL server has gone away at /home/slash/public_ html/index.pl line 46. DBD::mysql::st execute failed: MySQL server has gone away at slashmod.pm line 19 2. DBD::mysql::st execute failed: MySQL server has gone away at slashmod.pm line 34 . DBD::mysql::st execute failed: MySQL server has gone away at slashmod.pm line 30 3. DBD::mysql::st execute failed: MySQL server has gone away at /home/slash/public_ html/index.pl line 141. DBD::mysql::st execute failed: MySQL server has gone away at /home/slash/public_ html/index.pl line 93. I am able to perl *.pl fine, and get the correct output. Is this a server problem, a perl problem, or a MySQL problem? Do I need to adjust a timeout setting somewhere? Thanks, TGL