|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-03-24 13:47 UTC] romolo at bicnet dot it
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 02:00:02 2025 UTC |
<?php $conn=pg_connect("connection string"); $conn1=pg_connect("connection string"); echo $conn."<br>"; // output 1 echo $conn1."<br>"; // output 1 pg_close($conn); pg_close($conn1); // results in invalid resource ID error ?> looking at the code I can see that if you try to open two db connections, with the same connection string, only one really get opened, to the second one instead is assigned the same resource ID of the first and zend_list_addref function is called for the resource. If you close the first connection, it really get closed taking no care of the number of references to the resource.