mysql_pconnect() problems with PHP 4.3.0 anyone?
George Webb
gw.nyphp at gwprogramming.com
Thu Jan 23 01:24:30 EST 2003
Hi NYPHPeeps... I am jealous to be out of the area during the LWE...
I hope you are loving it.
Has anyone noticed any occasional failures with mysql_pconnect()
failing to reconnect using PHP version 4.3.0? I would assume the
desired operation would be for PHP to silently reconnect any persistent
connection which seems to have died. However the following fatal error
(it's hardly a "warning!") occurs somewhat frequently now, with PHP
4.3.0 (Apache module sapi) and MySQL 3.23.54 on RH Linux 7.1/Apache 1.3.27.
Also, the MySQL server is on a remote machine, so mysql_pconnect() is using
TCP/IP.
I suppose that dropped connections is not the problem;
rather, the problem is that mysql_pconnect() fails to *reconnect*.
Of course I don't see why the connection would have dropped;
the server was not restarted and there are no networking failures.
If I can't figure it out, I guess we'll go back to using
mysql_connect(), wouldn't you agree? Has anyone else noticed anything
similar? The PHP.net manual entry for mysql_pconnect()
( http://www.php.net/manual/en/function.mysql-pconnect.php )
shows a user comment suggesting that 4.3.0 might be the problem.
Below is the phpinfo() mysql section. Thanks for your thoughts.
----
mysql
MySQL Support => enabled
Active Persistent Links => 1
Active Links => 1
Client API version => 3.23.54
MYSQL_MODULE_TYPE => external
MYSQL_SOCKET => /tmp/mysql.sock
MYSQL_INCLUDE => -I/usr/local/mysql/include
MYSQL_LIBS => -L/usr/local/mysql/lib -lmysqlclient
Directive => Local Value => Master Value
mysql.allow_persistent => On => On
mysql.connect_timeout => -1 => -1
mysql.default_host => no value => no value
mysql.default_password => no value => no value
mysql.default_port => no value => no value
mysql.default_socket => /tmp/mysql.sock => /tmp/mysql.sock
mysql.default_user => no value => no value
mysql.max_links => Unlimited => Unlimited
mysql.max_persistent => Unlimited => Unlimited
mysql.trace_mode => Off => Off
----
Best, George.
George Webb
gw.nyphp at gwprogramming.com
More information about the talk
mailing list