PHP 4.0 Bug #7298 Updated: ... not a valid link resource... after pg_connect
| From: | thies@php.net | Date: | Tue, 13 Feb 2001 16:56:13 +0000 |
| Subject: | PHP 4.0 Bug #7298 Updated: ... not a valid link resource... after pg_connect | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-46485@lists.php.net to get a copy of this message | ||
ID: 7298
Updated by: thies
Reported By: aja@nlgroup.ca
Old-Status: Open
Status: Closed
Bug Type: PostgreSQL related
Assigned To:
Comments:
fixed in CVS. thanx for the patch!
Previous Comments:
---------------------------------------------------------------------------
[2000-10-17 18:15:34] aja@nlgroup.ca
(Found the problem and fixed it.)
In some script sequences (can send code if necessary) the routine to set the default link in pgsql.c
deletes the link before setting it - specifically, if a script issues multiple opens of the same
connection string through an included file only.
php_pgsql_set_default_link has a check if PGG(default_link)!=-1. If true, then it does
zend_list_delete of old default link and sets new one. If the old default link and new are the same,
this sometimes sets the default to an invalid link.
Code should be :
if (PGG(default_link)!=-1) {
if (PGG(default_link)==id) return;
...
Compiled it, and the problem is fixed. Checked postgresql connections, and they aren't
multiplying.
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=7298&edit=2