Re: PHP 4.0 Bug #6033 Updated: Can't open more than one non-persistent connections to the same database
| From: | Manuel Lemos | Date: | Sat, 12 Aug 2000 20:14:36 +0000 |
| Subject: | Re: PHP 4.0 Bug #6033 Updated: Can't open more than one non-persistent connections to the same database | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-28720@lists.php.net to get a copy of this message | ||
Hello Danny,
On 12-Aug-00 09:19:27, you wrote:
>I think this time it is *really* fixed, at least your test
>script now works with both ipcshm and soctcp connections.
>My own test script worked because it still had a reference to the
>closed link (using different connection variables).
Yes, this problem seems to be fixed but there seems to remain two minor
problems:
- ifx_errormsg() is causing memory leaks under both PHP3 and PHP4. You
need to compile PHP enabling debug output to see this.
- When you call ifx_errormsg() after closing a connection in PHP3 it
returns that connection does not exist but this does not happen under
under PHP4. Isn't ifx_errormsg() supposed to return the last error
message even if a connection is not established?
Try this script to see the problem:
$informix_server="demo_on";
$database_name="xpto";
$user="informix";
$password="informix_password";
PutEnv("INFORMIXSERVER=$informix_server");
if(($connection=ifx_connect("@".$informix_server,$user,$password)))
{
if(($result=@ifx_query("DATABASE $database_name",$connection)))
{
echo "Database: $database_name, Result: $result\n";
ifx_free_result($result);
}
else
echo "Database: $database_name Query error: ".ifx_errormsg(),"\n";
ifx_Close($connection);
echo "Error: ".ifx_errormsg(),"\n";
}
else
echo "Connection error: ".ifx_errormsg(),"\n";
Regards,
Manuel Lemos
Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
--
E-mail: mlemos@acm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--