ID:               32099
 Updated by:       [EMAIL PROTECTED]
 Reported By:      terryoh at wins21 dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         COM related
 Operating System: Windows 2000 Server
 PHP Version:      4.3.8
 New Comment:

Please try using this CVS snapshot:

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




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

[2005-02-25 01:52:36] terryoh at wins21 dot com

Description:
------------
Today, my apache server stopped service. So I tested whether the apache
daemon was ok or not. It worked, because the telnet 80 connection(like
C:/telnet.exe 127.0.0.1 80) was successful. But I could not open any
php pages on the internet explorer.

I checked the memory with windows task manager and I found something
strange. The allocated memory for apache was almost 1GB(998MB) and the
count of the handles was almost 40000(39890). 

Finally I found that it was ADO-PHP problem. I could see memory and the
count of handles increased when opening database and closing it
repeatedly(1 try/1 second for an hour). Especially the handles were
never decreased.

[Steps]
1) Register any ODBC DSN(driver=SQL Server)in the control panel.
2) In PHP.INI, set the key name(odbc.default_db) with the DSN;user
ID;password.
3) Start an apache service.
4) Open a test page(in the reproduce code section)in your web browser.
5) Refresh the test page repeatedly once a second.
6) Open windows task manager. If you can not see handle column on the
process tab, add it(Menu->View->Column Selection->Handle).
7) After 1 minute or later, you can see the count of apache handle
increase like 400->401->402->403.... Also you can see the memory
increase.




Reproduce code:
---------------
<?php
  $ConnectionString   = ini_get('odbc.default_db');

  $AdoConn = new COM("ADODB.Connection"); 
  $AdoConn->Open($ConnectionString);

  $AdoConn->Close();
  unset($AdoConn);
?>

***** Web Server  : Apache 1.3.28
***** PHP         : 4.3.8
***** OS          : Windows 2000 Server
***** DBMS        : MSSQL2000 Enterprise Edition
***** OTHERS      : MDAC 2.8


Expected result:
----------------
Windows Task Manager(Process Tab)
Image name      Memory       Handle
Apache.exe      10,840KB     200         11:00 AM
Apache.exe      10,857KB     201         11:02 AM
Apache.exe      10,867KB     202         11:04 AM
Apache.exe      10,867KB     202         11:06 AM
Apache.exe      10,867KB     202         11:08 AM
Apache.exe      10,867KB     202         11:10 AM
Apache.exe      10,867KB     202         11:12 AM
....

Actual result:
--------------
Windows Task Manager(Process Tab)
Image name      Memory       Handle
Apache.exe      10,840KB     200         11:00 AM
Apache.exe      10,857KB     201         11:02 AM
Apache.exe      10,867KB     202         11:04 AM
Apache.exe      10,877KB     203         11:06 AM
Apache.exe      10,886KB     204         11:08 AM
Apache.exe      10,899KB     205         11:10 AM
Apache.exe      10,910KB     206         11:12 AM
....
Apache.exe      998MB        39890


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


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

Reply via email to