ID:               35217
 Updated by:       [EMAIL PROTECTED]
 Reported By:      vovik at getart dot ru
-Status:           Feedback
+Status:           Bogus
 Bug Type:         MSSQL related
 Operating System: RHEL 4
 PHP Version:      4.4.1
 New Comment:

I've just tested this with the FreeTDS 0.64 and it works as expected.
If you are running PHP under Apache yoy need to restart the server when
you make changes to the php.ini file.


Previous Comments:
------------------------------------------------------------------------

[2005-11-14 20:36:31] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



------------------------------------------------------------------------

[2005-11-14 16:34:47] vovik at getart dot ru

Description:
------------
When I try to limit maximum number of MS SQL open connections via
php.ini it doesn't work properly. It doesn't work at all. Instead of
this, connections actually established, but some error messages (from
FreeTDS ?) appeared on every mssql_connect() above mssql.max_procs.

I've added sleep() to end of script for checking number of connections
on SQL server side and in example above it is 30.

Reproduce code:
---------------
<?php

// mssql.max_procs set to 26 in php.ini

$links = array();
for ($k = 0; $k < 30; ++$k) {
  $link = mssql_connect("mssqlserver", "xxx", "yyy", true);
  if (!$link) {
    exit("Connect failed.");
  }
  $links[] = $link;
}

sleep(20);

?>


Expected result:
----------------
PHP warning: Too many open links (26)
Connect failed.

Actual result:
--------------
(on stderr)
Max connections reached, increase value of TDS_MAX_CONN
Max connections reached, increase value of TDS_MAX_CONN
Max connections reached, increase value of TDS_MAX_CONN
Max connections reached, increase value of TDS_MAX_CONN



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35217&edit=1

Reply via email to