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