#20298 [Opn->Ana]: odbc.check_persistent not working

From: Date: Wed, 18 Dec 2002 19:59:45 +0000
Subject: #20298 [Opn->Ana]: odbc.check_persistent not working
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-27991@lists.php.net to get a copy of this message
 ID:               20298
 Updated by:       kalowsky@php.net
 Reported By:      t_o_m_@yahoo.com
-Status:           Open
+Status:           Analyzed
 Bug Type:         ODBC related
 Operating System: Windows 2000 Server SP2
 PHP Version:      4.3.0-pre2
 New Comment:

I'm unable to reproduce this on the UNIX end of things.  Anyone with a
Windows boxen working that can test this?


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

[2002-11-07 07:41:49] t_o_m_@yahoo.com

Make sure the odbc.check_persistent is on and that
odbc.allow_persistent is on. Set up a database connection called
dsnname
Run the script below (substituting [tabname] for a valid table name in
your database).
Check that you have persistent connections, ie with the webserver idle
make sure your database shows connections from the webserver.

Restart the database or kill the session belonging to the web server.

Re-run the script below and the odbc_exec fails with an error: 
"connection not open"  or smililar depending on your odbc driver.
I have found this effect to be the same with the Postgres odbc driver
and the Informix 3.30 odbc driver.

I presume that odbc.check_persistent is supposed to check that the
connection is still attached to the database before pconnect gives it
to the script?

<?
$dbconn = odbc_pconnect("dsnname","","");
$rid = odbc_exec($dbconn,"select * from [tabname]");

?>

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


-- 
Edit this bug report at http://bugs.php.net/?id=20298&edit=1



Thread (25 messages)

« previous php.bugs (#27991) next »