From: Frank M. Kromann Date: Mon, 14 Nov 2005 23:14:25 +0000 (+0000) Subject: Change max_procs from 25 to library default. This will make FreeTDS connections work... X-Git-Tag: php-5.1.0RC5~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fe306ed1a6e5cf7f4c330c4f2353946f7a361204;p=php Change max_procs from 25 to library default. This will make FreeTDS connections work a bit better --- diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index ad7e01fa5f..b70ad402ac 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -140,7 +140,7 @@ PHP_INI_BEGIN() STD_PHP_INI_ENTRY_EX("mssql.batchsize", "0", PHP_INI_ALL, OnUpdateLong, batchsize, zend_mssql_globals, mssql_globals, display_link_numbers) STD_PHP_INI_BOOLEAN("mssql.datetimeconvert", "1", PHP_INI_ALL, OnUpdateBool, datetimeconvert, zend_mssql_globals, mssql_globals) STD_PHP_INI_BOOLEAN("mssql.secure_connection", "0", PHP_INI_SYSTEM, OnUpdateBool, secure_connection, zend_mssql_globals, mssql_globals) - STD_PHP_INI_ENTRY_EX("mssql.max_procs", "25", PHP_INI_ALL, OnUpdateLong, max_procs, zend_mssql_globals, mssql_globals, display_link_numbers) + STD_PHP_INI_ENTRY_EX("mssql.max_procs", "-1", PHP_INI_ALL, OnUpdateLong, max_procs, zend_mssql_globals, mssql_globals, display_link_numbers) PHP_INI_END() /* error handler */ @@ -341,7 +341,9 @@ PHP_RINIT_FUNCTION(mssql) dbsetlogintime(MS_SQL_G(connect_timeout)); if (MS_SQL_G(timeout) < 0) MS_SQL_G(timeout) = 60; dbsettime(MS_SQL_G(timeout)); - dbsetmaxprocs((TDS_SHORT)MS_SQL_G(max_procs)); + if (MS_SQL_G(max_procs) != -1) { + dbsetmaxprocs((TDS_SHORT)MS_SQL_G(max_procs)); + } return SUCCESS; } diff --git a/php.ini-dist b/php.ini-dist index 49197f1dbb..55613d7a57 100644 --- a/php.ini-dist +++ b/php.ini-dist @@ -1030,8 +1030,10 @@ mssql.compatability_mode = Off ; Use NT authentication when connecting to the server mssql.secure_connection = Off -; Specify max number of processes. Default = 25 -;mssql.max_procs = 25 +; Specify max number of processes. -1 = library default +; msdlib defaults to 25 +; FreeTDS defaults to 4096 +;mssql.max_procs = -1 [Assertion] ; Assert(expr); active by default. diff --git a/php.ini-recommended b/php.ini-recommended index 8a49b3e58a..0f8078e951 100644 --- a/php.ini-recommended +++ b/php.ini-recommended @@ -1088,8 +1088,10 @@ mssql.compatability_mode = Off ; Use NT authentication when connecting to the server mssql.secure_connection = Off -; Specify max number of processes. Default = 25 -;mssql.max_procs = 25 +; Specify max number of processes. -1 = library default +; msdlib defaults to 25 +; FreeTDS defaults to 4096 +;mssql.max_procs = -1 [Assertion] ; Assert(expr); active by default.