Bug #70123 [Asn]: OOM on odbc_exec against DB2

From: Date: Tue, 28 Jul 2015 17:23:50 +0000
Subject: Bug #70123 [Asn]: OOM on odbc_exec against DB2
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-194785@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70123&edit=1 ID: 70123 User updated by: twist at fowlie dot net Reported by: twist at fowlie dot net Summary: OOM on odbc_exec against DB2 Status: Assigned Type: Bug Package: ODBC related Operating System: Ubuntu 14.04.2 x64 PHP Version: 5.6.11 Assigned To: cmb Block user comment: N Private report: N New Comment: OK... I *finally* got it compiled and configured properly. I can't believe how much I've forgotten over the years -- I'm definitely too spoiled by distro packages! Everything is working correctly with 5.6.12RC1, so I presume that the fix for #69975 fixes this one as well. Do I mark this one closed? Thanks for your kind assistance, Christoph! --James Previous Comments: ------------------------------------------------------------------------ [2015-07-24 22:21:00] cmb@php.net Before you spend too much time trying to build PHP 5.6.12RC1, please consider to get an ODBC trace with 5.6.11 and post the table definition. This is likely to show already whether the patch would possibly fix your issue, too. :) ------------------------------------------------------------------------ [2015-07-24 21:51:16] twist at fowlie dot net I thought I should just respond, even though I haven't made much progress. I've downloaded 5.6.12RC1 and have spent the morning trying to get it installed, but haven't made much progress generally. I had forgotten how much fun in can be to configure/make/make install -- needless to say, it's taking me a while. Even though I've compiled it with unixODBC, I can't find the module, let alone get it installed. I'll continue to try over the weekend. Thanks for pointing me to #69975. I agree that it sounds like the two are closely related. --J ------------------------------------------------------------------------ [2015-07-24 12:38:21] cmb@php.net Forgot the footnotes: [1] <http://downloads.php.net/~jpauli/> [2] <http://www.unixodbc.org/odbcinst.html> ------------------------------------------------------------------------ [2015-07-24 12:10:18] cmb@php.net Please try with PHP 5.6.12RC1[1] where the possibly related bug #69975 has been fixed. If the issue is not solved with this version, please provide the table definition of CNFNAR and an ODBC trace[2] of the test script. Please do not embed a huge ODBC trace directly in the bug report, but rather put it somewhere else (pastebin, gist.github etc.) and link to it. ------------------------------------------------------------------------ [2015-07-24 00:01:25] twist at fowlie dot net Description: ------------ When running 5.6.11 with unix_odbc (2.2.14p2) and the iSeriesAccess (6.1.0-2.2) drivers, I received an OOM where PHP tries to allocate an enormous amount of memory for a very simple query. Once it hits odbc_exec() it throws the fatal error. The same configuration and script runs on 5.3.2 as expected. Unfortunately, I don't know my way around the source to suggest a fix as the developer in Bug #69354 did. I'm comfortable applying patches and running things through make with some guidance. My php.ini is stock Ubuntu. Test script: --------------- putenv("DB2DIR=/opt/ibm/iSeriesAccess/lib64/"); putenv("ODBCINI=/etc/odbc.ini"); $dbh = odbc_connect("LMS", user, pass); $query = "select * from CNFNAR where NCNARR like '%JDF%'"; $res = odbc_exec($dbh, $query); Actual result: -------------- PHP Fatal error: Out of memory (allocated 262144) (tried to allocate 14944499140640374786 bytes) on line 2 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70123&edit=1

« previous php.bugs (#194785) next »