|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-10-12 11:58 UTC] jani@php.net
[2007-10-22 22:43 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 00:00:01 2025 UTC |
Description: ------------ Value for mssql.timeout is only consulted on PHP engine startup. The value is changeable in script in runtime, but setting it has no effect for newly opened connections. So script gets default timeout set in php.ini, which is 60 seconds in default installation. This is quite inconvenient in that you need different PHP.INI for web server CGI PHP (where queries are short and you want to cache runaway queries) and batch scripts (which execute long queries and need timeout disabled). The value used to be applied properly when set in a script in earlier version, perhaps even as recent as 5.1 (but I don't really recall). Reproduce code: --------------- echo ini_get('mssql.timeout')."\n"; ini_set('mssql.timeout', 1); echo ini_get('mssql.timeout')."\n"; $c = mssql_connect(host, user, pass) $s = mssql_query($c, "WAITFOR DELAY '00:00:05'"); Expected result: ---------------- 60 1 Warning: mssql_query(): Query failed in script.php on line 10 Actual result: -------------- 60 1