Bug 1009909 - Problem with php odbc for db2
Problem with php odbc for db2
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: php (Show other bugs)
19
ppc64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Joe Orton
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-19 09:24 EDT by christophe.conduche
Modified: 2013-11-22 12:04 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-22 12:04:46 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
PHP Bug Tracker 65710 None None None Never

  None (edit)
Description christophe.conduche 2013-09-19 09:24:38 EDT
Description of problem:

odbc function in php (odbc_result, odbc_fetch_array) cause memory error.

Version-Release number of selected component (if applicable):
php5.5.3 fedora19 arch ppc64p7


How reproducible:
always

Steps to Reproduce:
1.
<?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";

?>

2.
3.

Actual results:
TEST CONNEXION DB2 - ODBC 

array(1) { ["00001"]=> string(365) "1���jx���jxlz��a���j����j�lz`" } 

Fin de test


Expected results:
TEST CONNEXION DB2 - ODBC

array(1) { ["00001"]=> string(1) "1" } 

Fin de test


Additional info:

 isql --version
unixODBC 2.3.1

isql works fine and give good result :

SQL> SELECT 1 FROM SYSIBM.SYSDUMMY1
+-----------+
| 00001     |
+-----------+
| 1         |
+-----------+
SQLRowCount returns -1
1 rows fetched
SQL>
Comment 1 Remi Collet 2013-10-14 07:14:48 EDT
I'm sorry, but I cannot reproduce this issue.

I can get a ppc64 computer running:
Fedora 19,
php-5.5.4-1.fc19
UnixODBC-2.3.1-6.fc19
mysql-connector-odbc-5.2.5-2.fc19

I don't have access to any DB2 database, and with MariaDB 5.5 the reproducer works as expected.
Comment 2 christophe.conduche 2013-10-14 09:26:53 EDT
It's the problem to be able to reproduce.

My particular configuration is a Power720 with "AS400" stuff on partition 1 and Fedora on partition 2. On Fedora the connection to a Mariadb base works like expected, but not the connexion to the DB2 database on the AS400.

A remote linux box, debian and intel based, can connect nicely to the same DB2 base on the AS400.

I guess that there is something related to the ppc64p7 optimization somewhere and incompatible datatype sizes in 2 modules, but which ones ???

I read about similar bugs in the old time of php-odbc with 64 bits implementation and connexion on Microsoft SQL Server.
Comment 3 christophe.conduche 2013-10-14 10:14:49 EDT
I started a discussion there too :

https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000001052
Comment 4 christophe.conduche 2013-11-22 12:04:46 EST
The release today of ibm-iaccess-1.1.0.1-1.0.ppc64.rpm fixed this issue.

The problem was in their ODBC driver for PPC64 not in PHP or unixodbc

Note You need to log in before you can comment on or make changes to this bug.