Description:
------------
im not sure if its a bug or missing functionality but i cant set query timeout per query. I want to be able to do ini_set('mssql.timeout', 6); before query to set its timeout to 6 seconds and then ini_set('mssql.timeout', 20); to set 20s timeout for following query.
This seems to be possible with patch i attach just one line needs to be added. but im not sure if this would not break anything (seems to work for me on lenny).
Test script:
---------------
// connect
$connection = mssql_connect($dbhost, $dbuser, $dbpass);
mssql_select_db($dbname, $connection);
// does not have affect if called after connect
ini_set('default_socket_timeout', 1);
ini_set('mssql.connect_timeout', 1);
ini_set('mssql.timeout', 3);
// call sproc with results and no delay
$start = microtime(true);
$rid = mssql_query("exec timeout_test 0, 0, 'Y';");
while ($rec = mssql_fetch_assoc($rid)) {
$row[] = $rec;
}
echo "=".print_r( $row, true )."= in ".(microtime(true)-$start)." with ".mssql_get_last_message()."\n";
Expected result:
----------------
i think it would be good if you could set query timeout at any time and it would affect the following queries (until you change the timeout value)
Actual result:
--------------
timeout set after connection is established does not have effect

This bug has been fixed in SVN.
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.