|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-03-28 09:03 UTC] tstarling at wikimedia dot org
Description:
------------
mysql.connect_timeout is ignored, a fixed timeout of 20s is used. Observed on PHP 5.2.5 WinXP, not observed on PHP 5.1.4 Linux.
Reproduce code:
---------------
print mysql_get_client_info() ."\n";
ini_set('mysql.connect_timeout',1);
$t = -microtime(true);
mysql_connect('1.2.3.4');
$t += microtime(true);
print "$t\n";
ini_set('mysql.connect_timeout',100);
$t = -microtime(true);
mysql_connect('1.2.3.4');
$t += microtime(true);
print "$t\n";
Expected result:
----------------
5.0.45
1.00128006935
99.9788169861
Actual result:
--------------
5.0.45
20.9900009632
21.0206007957
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 19:00:02 2025 UTC |
Hi, \I suspect a problem in libmysql, not PHP. The ext/mysql sources do set the connect_timeout if (connect_timeout != -1) { mysql_options(&mysql->conn, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&connect_timeout); } Are you sure you don't have several libmysql.dll on your system?