ID: 42450 Updated by: [EMAIL PROTECTED] Reported By: davojan at mail dot ru -Status: Open +Status: Feedback Bug Type: PostgreSQL related Operating System: FreeBSD and WinXP PHP Version: 5.2.3 New Comment:
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 Previous Comments: ------------------------------------------------------------------------ [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