Bug #65710 [Opn]: odbc_result or odbc_fetch_array cause php error memory
| From: | christophe dot conduche at bio-c-bon dot fr | Date: | Fri, 22 Nov 2013 17:00:33 +0000 |
| Subject: | Bug #65710 [Opn]: odbc_result or odbc_fetch_array cause php error memory | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-182890@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65710&edit=1
ID: 65710
User updated by: christophe dot conduche at bio-c-bon dot fr
Reported by: christophe dot conduche at bio-c-bon dot fr
Summary: odbc_result or odbc_fetch_array cause php error
memory
Status: Open
Type: Bug
Package: ODBC related
Operating System: Fedora 19 ppc64p7
PHP Version: 5.5.3
Block user comment: N
Private report: N
New Comment:
This problem was on the ODBC driver from IBM.
The release today of ibm-iaccess-1.1.0.1-1.0.ppc64.rpm fix this issue !!
Just be aware to force the installation with rpm -Uvh --nodeps to avoid the problem of version with
unixodbc and to do the symlink from libodbcinst.so.1 to libodbcinst.so.2 (but if you had already a
buggy installation like me and waiting for this release, this link has already be done by you on
your system ;-) )
Previous Comments:
------------------------------------------------------------------------
[2013-09-19 12:58:11] christophe dot conduche at bio-c-bon dot fr
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 this bug report at https://bugs.php.net/bug.php?id=65710&edit=1