|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-01-23 15:20 UTC] derek at bluegenesis dot com
Previous to version 4.1.1, using define() to define a handle to a MySQL connection worked fine:
define(DB, mysql_connect(host,user,pass));
In PHP 4.1.1, if the above is done, then the script will hang for a long time (for a minute or so) if other mysql connections are attempted to be made.
i.e.:
function hang_mysql()
{
define(DB1, mysql_connect(host,user,pass));
define(DB2, mysql_connect(host,user,pass));
}
function doesnt_hang()
{
$db1 = mysql_connect(host,user,pass);
$db2 = mysql_connect(host,user,pass);
}
This wasn't a problem in PHP 4.0.6 and older versions.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 02:00:01 2025 UTC |
The same probrem occur with PostgreSQL. This script will hang. <?php define ("DBCONN01",pg_connect("dbname=db01 user=username")); define ("DBCONN02",pg_connect("dbname=db02 user=username")); pg_exec(DBCONN01,"select * from hogehoge"); pg_exec(DBCONN02,"select * from fugafuga"); ?> RedhatLinux6.2(en) + php4.1.1 + PostgreSQL7.1.3