PHP 4.0 Bug #5862 Updated: Consecutive pg_open statements cause second statement to fail

From: Date: Tue, 13 Feb 2001 16:57:10 +0000
Subject: PHP 4.0 Bug #5862 Updated: Consecutive pg_open statements cause second statement to fail
Groups: php.dev 
Request: Send a blank email to php-dev+get-46486@lists.php.net to get a copy of this message
ID: 5862 Updated by: thies Reported By: reinke@e-softinc.com Old-Status: Open Status: Closed Bug Type: PostgreSQL related Assigned To: Comments: fixed in CVS Previous Comments: --------------------------------------------------------------------------- [2000-07-30 18:47:28] reinke@e-softinc.com Using PostGres 7.0.2, and the latest PHP, any script that would choose to open a database connection a second time will fail. For example: <? $pg = pg_connect("dbname=customer"); $res = pg_exec("select count(*) from list_weeklynews;"); pg_close($pg); $pg = pg_connect("dbname=customer"); $res = pg_exec("select count(*) from list_weeklynews;"); pg_close($pg); ?> The second connect fails with: 1 is not a valid PostgreSQL link resource in file.php Repeating the 3 lines multiple times in the script does pretty unusual stuff - the file descriptor is bouncing all over the place - if file descriptors were properly closed, the same descriptor would in all likelihood be re-used --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=5862&edit=2

« previous php.dev (#46486) next »