|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41404 ODBC makes memory leaks
Submitted: 2007-05-15 21:34 UTC Modified: 2008-09-01 10:03 UTC
Avg. Score:4.5 ± 0.8
Reproduced:9 of 10 (90.0%)
Same Version:4 (44.4%)
Same OS:4 (44.4%)
From: geniuz at geniuz dot cz Assigned:
Status: Open Package: ODBC related
PHP Version: 5.2.2 OS: XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: geniuz at geniuz dot cz
New email:
PHP Version: OS:


 [2007-05-15 21:34 UTC] geniuz at geniuz dot cz
When I select over ODBC from table with any column data type defined as TEXT (detected over odbc_columns function), and I fetch rows, I receive one of following messages or php freeze. I selected more than 100000 rows.
When I replaced selected TEXT data type column for any other column ie. STRING data type column (and with more saved datas), all is ok without errors.
Well, problem must be with TEXT datatype (LONG columns).

Warning: odbc_exec() [function.odbc-exec]: SQL error: Failed to fetch error message, SQL state HY000 in SQLExecDirect in M:\4D\.WebRoot\ctp\eshop\index.php on line 65

Warning: odbc_exec() [function.odbc-exec]: SQL error: [Simba][Simba ODBC Driver]Memory allocation error., SQL state S1001 in SQLExecDirect in M:\4D\.WebRoot\ctp\eshop\index.php on line 65

Reproduce code:
$sql = "SELECT Col1, Col2, Col3 FROM MYTABLE";
while( odbc_fetch_row($rs) )
	$data1 = odbc_result($rs,'Col1');
	$data2 = odbc_result($rs,'Col2');
	$data3 = odbc_result($rs,'Col3');

Expected result:
no sql error

Actual result:
sql error


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-27 05:55 UTC] bmeekhof at umich dot edu
I am able to reproduce this bug using PHP 5.2.6 and Microsoft-IIS/6.0 running on Windows NT (phpinfo says only windows NT, whether it might really be W200X Server I couldn't say).  I am using ADODB with the odbc_oracle driver.   

In my case it is triggered by querying for any CLOB column from an Oracle database.  I get no results and the driver says it cannot retrieve the error message and also gives an error HY000 (same as reported in bug).   The same query is fine if I do not include the only CLOB field in this particular table.  Querying for that field by itself or in combination with the others will produce the error.  I have not seen the memory error also reported in the bug.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Sep 29 20:01:24 2020 UTC