From:             [EMAIL PROTECTED]
Operating system: Suse Linux 7.0 - apache 1.3.17
PHP version:      4.0 Latest CVS (22/03/2001)
PHP Bug Type:     PostgreSQL related
Bug description:  pg_close close any connection open with the same connection string

<?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. 




-- 
Edit Bug report at: http://bugs.php.net/?id=9937&edit=1



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to