ID: 8907
Updated by: thies
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: PostgreSQL related
Assigned To: 
Comments:

fixed in CVS

Previous Comments:
---------------------------------------------------------------------------

[2001-01-25 10:50:13] [EMAIL PROTECTED]
I've found that the following code gives an error

<?php
$pq_host = "192.168.0.55";
$pq_port = "5432";
$pq_db = "luca";
$pq_user = "postgres";
$pq_pwd = "postgres";
$pq1 = pg_Connect ("host=$pq_host port=$pq_port
dbname=$pq_db user=$pq_user password=$pq_pwd");
echo "step1<BR>";
$pq2 = pg_Connect ("host=$pq_host port=$pq_port
dbname=$pq_db user=$pq_user password=$pq_pwd");
echo "step2<BR>";
echo "$pq1 $pq2<BR>";
pg_Close ($pq2);
echo "back2<BR>";
pg_Close ($pq1);
// ^Here it will send a warning
echo "back1<BR>";
?>

It seems that pg_Connect or pg_Close doesn't stack or
consider the number of open calls. At the first pg_Close it
also closes the previous connection.
It works fine with PHP 4.0.3pl1
Seems strange as code bat it's very usefull if you wrote
general purpose routines to access DB.

best regards
 Luca


---------------------------------------------------------------------------



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8907&edit=2


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