ID: 42450 User updated by: davojan at mail dot ru Reported By: davojan at mail dot ru Status: Open Bug Type: PostgreSQL related Operating System: FreeBSD and WinXP PHP Version: 5.2.3 New Comment:
New information: not only the first try. Rather first try to use of any of the old (being created before restart) persistent connections fails. P.S.: Sorry for my English. I hope you understand me :) Previous Comments: ------------------------------------------------------------------------ [2007-08-28 08:14:12] davojan at mail dot ru I've tried the latest version under WinXP. The first try to open persistent connection after PostgreSQL server restart fails in the same way as above. The following connections is OK. Could you please repair the first connection too? :) ------------------------------------------------------------------------ [2007-08-27 23:27:44] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi ------------------------------------------------------------------------ [2007-08-27 20:56:27] davojan at mail dot ru Description: ------------ When using PDO pgSQL with persistent connections and restarting the PostgreSQL server, which the PDO has been connected with, PDO raises exception (see below). So I need to restart PHP to reset persistent connections. The bug was reproduced in two different environments: Apache2 (multi-threaded) + mod_php + WinXP lighttpd + PHP(FastCGI) + FreeBSD MySQL persistent connections in the same situation works fine... Reproduce code: --------------- <?php $db = new PDO( 'pgsql:host=localhost port=5432 dbname=test user=user password=secret', 'user', 'secret', array( PDO::ATTR_PERSISTENT => true ) ); echo 'ok'; ?> # /usr/local/etc/rc.d/postgresql restart and again the above php script Expected result: ---------------- ok Actual result: -------------- Unknown exception: SQLSTATE[57P01]: Admin shutdown: 7 FATAL: <closing connection on admin command> (this is my translation from russian message) server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42450&edit=1