From: philippe dot marasse at ac-poitiers dot fr Operating system: Linux Red Hat EL5 x86_64 PHP version: 5.2.6 PHP Bug Type: PDO related Bug description: php segfaults on some queries using pdo_odbc & ibm-db2 on a 64bits platform
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 bug report at http://bugs.php.net/?id=46473&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46473&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46473&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46473&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46473&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46473&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46473&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46473&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46473&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46473&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46473&r=support Expected behavior: http://bugs.php.net/fix.php?id=46473&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46473&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46473&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46473&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46473&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46473&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46473&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46473&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46473&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46473&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46473&r=mysqlcfg
