From: jdolecek at netbsd dot org Operating system: Windows PHP version: 5.2.4 PHP Bug Type: MSSQL related Bug description: mssql.timeout can only be set in php.ini
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 -- Edit bug report at http://bugs.php.net/?id=42943&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42943&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42943&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42943&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42943&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42943&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42943&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42943&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42943&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42943&r=support Expected behavior: http://bugs.php.net/fix.php?id=42943&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42943&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42943&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42943&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42943&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42943&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42943&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42943&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42943&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42943&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42943&r=mysqlcfg