From:             [EMAIL PROTECTED]
Operating system: Linux Slackware 7.0
PHP version:      4.0.4
PHP Bug Type:     PostgreSQL related
Bug description:  pg_Close on multiple connections to same host

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



-- 
Edit Bug report at: http://bugs.php.net/?id=8907&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