|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-02-08 11:19 UTC] gg dot cwlee at gmail dot com
Description: ------------ We have a resource leak problem when using Apache 2.2.11 and PHP 5.2.12 with odbc_connect() and odbc_close() functions on dbase or Microsoft Access. From my observe, it will leak some (Nonpaged) kernel Memory and some handles not free by the Apache(HTTPD.EXE). And I also tested no this resource leak problem on Apache 2.2.11 and PHP 5.2.0. Thanks. Chris Reproduce code: --------------- <?php $dsnMDB = "DRIVER=Microsoft Access Driver (*.mdb);UID=admin;UserCommitSync=Yes;Threads=3;SafeTransactions=0;PageTimeout=5;MaxScanRows=8;MaxBufferSize=2048;FIL=MS Access;DriverId=25;DefaultDir=D:\;DBQ=D:\db1.mdb;"; $dsnDBF = "DRIVER=Microsoft dBase Driver (*.dbf);UID=admin;UserCommitSync=Yes;Threads=3;Statistics=0;SafeTransactions=0;PageTimeout=5;MaxScanRows=8;MaxBufferSize=2048;FIL=dBase IV;DriverId=277;Deleted=1;DefaultDir=D:\;DBQ=D:\datasource\;CollatingSequence=ASCII;"; $dsn= $dsnDBF; $userDB=odbc_connect($dsn,"",""); odbc_close($userDB); ?> PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 22:00:01 2025 UTC |
We identify the problem is within php_curl.dll. We are using PHP v5.2.12, and find that all newer PHP versions have this problem. We have to backtrack to the older PHP v5.2.0 before this problem disappears. The problem source code: PHP v5.2.12 ext\curl\interface.c Line 670 #ifdef PHP_CURL_NEED_OPENSSL_TSL if (!CRYPTO_get_id_callback()) { int i, c = CRYPTO_num_locks(); php_curl_openssl_tsl = malloc(c * sizeof(MUTEX_T)); PHP v5.2.0 ext\curl\interface.c Line 609 #ifdef PHP_CURL_NEED_OPENSSL_TSL { int i, c = CRYPTO_num_locks(); php_curl_openssl_tsl = malloc(c * sizeof(MUTEX_T)); The only difference is the if statement: if (!CRYPTO_get_id_callback())