Bug #70123 [Opn->Fbk]: OOM on odbc_exec against DB2

From: Date: Fri, 24 Jul 2015 12:38:22 +0000
Subject: Bug #70123 [Opn->Fbk]: OOM on odbc_exec against DB2
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-194673@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 Updated by: cmb@php.net Reported by: twist at fowlie dot net Summary: OOM on odbc_exec against DB2 -Status: Open +Status: Feedback Type: Bug Package: ODBC related Operating System: Ubuntu 14.04.2 x64 PHP Version: 5.6.11 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Forgot the footnotes: [1] <http://downloads.php.net/~jpauli/> [2] <http://www.unixodbc.org/odbcinst.html> Previous Comments: ------------------------------------------------------------------------ [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 (#194673) next »