#46473 [Opn->Asn]: php segfaults on some queries using pdo_odbc & ibm-db2 on a 64bits platform
ID: 46473
Updated by: iodbc@php.net
Reported By: philippe dot marasse at ac-poitiers dot fr
-Status: Open
+Status: Assigned
Bug Type: PDO related
Operating System: Linux Red Hat EL5 x86_64
PHP Version: 5.2.6
-Assigned To:
+Assigned To: iodbc
New Comment:
I am working on a fix for pdo_odbc to bring it up to ODBC 3.51 API
specification including full 64bit support, similar to the work i did
on
the regular ext/odbc code.
Previous Comments:
------------------------------------------------------------------------
[2008-11-03 15:35:13] philippe dot marasse at ac-poitiers dot fr
Description:
------------
On our both platforms (32 & 64 bits), we have php compiled with support
for IBM DB2 database via pdo_odbc extension. We ran into unexpected
segfaults deploying a new application on a 64 bits server.
We have tested several client version of DB2 but nothing helped.
At last, it seemed that pdo_odbc extensions did not compile properly,
as we got several warnings like :
passing argument 2 of 'SQLRowCount' from incompatible pointer type
Bug #32830 (related to odbc, not pdo_odbc) points out the same issue.
We wrote a little patch that works for us (tm), available at :
http://huan.ac-poitiers.fr/pdo_odbc_db2-x86_64.patch
Rgds.
Reproduce code:
---------------
<?php
$toto = new PDO("odbc:mydb","user","password");
$req = "SELECT ETA_DENOMINATION FROM ETABLISSEMENT WHERE
ETA_DEPARTEMENT = 16 AND ETA_RNE = '0160001P'";
$machin = $toto->query($req);
$truc = $machin->fetchObject();
?>
Expected result:
----------------
nothing indeed :-), it's just a script we used to isolate a query which
crashes only on our 64bits servers (of course, it works fine on 32bits
platform).
Actual result:
--------------
segfault... unless the value of ETA_DENOMINATION is not NULL.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46473&edit=1
Thread (9 messages)