#42943 [Asn->Csd]: Move *timeout initialization from RINIT to connect time
| From: | iliaa@php.net | Date: | Mon, 22 Oct 2007 22:43:46 +0000 |
| Subject: | #42943 [Asn->Csd]: Move *timeout initialization from RINIT to connect time | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-118845@lists.php.net to get a copy of this message | ||
ID: 42943
Updated by: iliaa@php.net
Reported By: jdolecek at netbsd dot org
-Status: Assigned
+Status: Closed
Bug Type: MSSQL related
Operating System: Windows
PHP Version: 5.2.4
Assigned To: fmk
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Si
Previous Comments:
------------------------------------------------------------------------
[2007-10-12 11:58:38] jani@php.net
Frank, There was one report about this but that's now "dead". So let's
make this the change request for moving the timeout stuff out of RINIT.
------------------------------------------------------------------------
[2007-10-12 10:06:12] jdolecek at netbsd dot org
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 this bug report at http://bugs.php.net/?id=42943&edit=1