PHP 4.0 Bug #6105 Updated: odbc_pconnect returns 'not a valid ODBC-Link resource'

From: Date: Wed, 03 Jan 2001 00:13:50 +0000
Subject: PHP 4.0 Bug #6105 Updated: odbc_pconnect returns 'not a valid ODBC-Link resource'
Groups: php.dev 
Request: Send a blank email to php-dev+get-42753@lists.php.net to get a copy of this message
ID: 6105 Updated by: sniper Reported By: wls@wwco.com Old-Status: Open Status: Feedback Bug Type: ODBC related Assigned To: Comments: Previous Comments: --------------------------------------------------------------------------- [2000-08-31 09:04:23] stas@php.net reclassify --------------------------------------------------------------------------- [2000-08-11 07:42:01] wls@wwco.com Changing odbc_connect to odbc_pconnect causes the script to fail, complaining that the $odbchandle "Supplied resource is not a valid ODBC-Link resource" on a odbc_close($odbchandle). Leaving the code as is works perfectly. ... // Connect to the database $odbchandle = odbc_connect( $DSN, $USERNAME, $PASSWORD ); if ( $odbchandle ) { // Query for the user record $query = "SELECT * FROM Subscribers WHERE SubscriptionID='" . $subscriberID . "'"; $queryresult = odbc_do( $odbchandle, $query ); // ... odbc_close( $odbchandle ); ... It _seems_ that commenting out the odbc_close() when using the odbc_pconnect() causes the warning to go away. Naturally this begs the question about when persistent handles go away... but still, I wouldn't think odbc_close() causes a warning. Using odbc_close_all() works just fine, with no warning. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=6105

« previous php.dev (#42753) next »