PHP 4.0 Bug #5980: Informix ifx_connect reuses closed connection resource id

From: Date: Fri, 04 Aug 2000 23:47:13 +0000
Subject: PHP 4.0 Bug #5980: Informix ifx_connect reuses closed connection resource id
Groups: php.dev 
Request: Send a blank email to php-dev+get-27785@lists.php.net to get a copy of this message
From: mlemos@acm.org Operating system: Linux RH 6 PHP version: 4.0 Latest CVS (05/08/2000) PHP Bug Type: Misbehaving function Bug description: Informix ifx_connect reuses closed connection resource id It seems that when ifx_connect is called twice in the same script using the same connection parameters it returns the same connection resource id even when the connection was closed before calling ifx_connect for the second time. Try the following example to see the problem. Function Doit($go) { global $informix_server,$database_name,$database,$user,$password,$some_table; PutEnv("INFORMIXSERVER=$informix_server"); if(($connection=ifx_connect($database,$user,$password))) { if(($result=ifx_query("SELECT * FROM $some_table",$connection))) ifx_free_result($result); else echo "Go $go Query error: ".ifx_errormsg(),"\n"; ifx_Close($connection); } else echo "Connection error: ".ifx_errormsg(),"\n"; } $informix_server="demo_on"; $database_name="my_database"; $user="informix"; $password="informixpassword"; $some_table="my_table"; $database="$database_name@$informix_server"; DoIt(1); DoIt(2);

« previous php.dev (#27785) next »