From: christophe dot conduche at bio-c-bon dot fr
Operating system: Fedora 19 ppc64p7
PHP version: 5.5.3
Package: ODBC related
Bug Type: Bug
Bug description:odbc_result or odbc_fetch_array cause php error memory
Description:
------------
ODBC connexion to a DB2 database makes php out of memory on fedora 19
ppc64p7 arch.
Same script on a debian 64 bit box works ok.
SQLi gives correct results on the 2 test systems.
Test script:
---------------
<?php
echo "TEST CONNEXION DB2 - ODBC <HR>";
$dsn = "power7";
$user = "xxx";
$passwd = "yyy";
$conn = odbc_connect($dsn,$user,$passwd );
if (!$conn)
{exit("Connection Failed: " . $conn);}
$sql="SELECT 1 FROM SYSIBM.SYSDUMMY1";
$rs=odbc_exec($conn,$sql);
if (!$rs)
{exit("Error in SQL");}
$myarray = odbc_fetch_array($rs);
odbc_close($conn);
var_dump ($myarray);
echo "<HR>Fin de test";
?>
Expected result:
----------------
TEST CONNEXION DB2 - ODBC
array(1) { ["00001"]=> string(1) "1" }
Fin de test
Actual result:
--------------
TEST CONNEXION DB2 - ODBC
array(1) { ["00001"]=> string(365)
"1���jx���jxlz��a���j����j�lz`" }
Fin de test
--
Edit bug report at https://bugs.php.net/bug.php?id=65710&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=65710&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=65710&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=65710&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65710&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65710&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65710&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65710&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65710&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65710&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65710&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=65710&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=65710&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65710&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65710&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65710&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65710&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65710&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65710&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65710&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65710&r=mysqlcfg