From:             ed at supergeek dot com
Operating system: Debian GNU/Linux 3.1 (sarge)
PHP version:      5.1.4
PHP Bug Type:     *Database Functions
Bug description:  odbc_result w/ IBM DB2 fails trying to allocate huge memory 
chunk (>500MB)

Description:
------------
PHP 5.1.4 compiled with --with-ibm-db2. IBM DB2 Version 8.2 FixPak 4
(equivalent to Version 8.1 FixPak 11) is installed on machine running
Debian GNU/Linux 3.1 (sarge). The IBM DB2 Connect client piece is used to
communicate over TCP/IP to a DB2 database running on an AS400 iSeries
machine.

When odbc_result() is called after simple SELECT statement, the script
fails after trying to allocate 544498534 bytes (memory_limit = 500MB).
Script seg faults at same location if memory_limit is increased to 600MB.
When the same SELECT statement is run using the IBM 'db2' utility on the
same client machine, itproduces about 350 records containing a total of
less that 350KB of information.

The same PHP code that produces this error previously worked under PHP
4.3.4 running on the same machine, but *stopped* working with the same
type of error immediately after the iSeries DB2 host machine was upgraded
to V5R4. It was this error that prompted the upgrade to PHP5 in the hopes
the problem would be solved. No luck!


Reproduce code:
---------------
Source code unlikely to be useful do to unique nature of our database
environment, but can be provided if desired.



-- 
Edit bug report at http://bugs.php.net/?id=37963&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37963&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=37963&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37963&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37963&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37963&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37963&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37963&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37963&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37963&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37963&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37963&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37963&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37963&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37963&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37963&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37963&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37963&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37963&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37963&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37963&r=mysqlcfg

Reply via email to