|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-02-13 11:57 UTC] thies@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 10:00:01 2025 UTC |
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