Bug #16074 [NEW]: pdo_informix bidValue(...) does not work correctly

From: Date: Wed, 25 Mar 2009 19:24:12 +0000
Subject: Bug #16074 [NEW]: pdo_informix bidValue(...) does not work correctly
Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-6490@lists.php.net to get a copy of this message
From: sahib dot alejandro at gmail dot com Operating system: Ubuntu 8.10 Package version: PHP version: 5.2.6 Package: Bug System Bug Type: Bug Bug description: pdo_informix bidValue(...) does not work correctly Description: ------------ PDO_INFORMIX bindValue(...) or bindParam(...) does not work as expected, there is no diference using prepare(...) with a direct sql query or a stored procedure query. It seems the binded value lose their value and if you're using these value in the WHERE clause then always fail the condition. Configuration: Ubuntu 8.10 Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4.1 with Suhosin-Patch Informix CSDK 3.50 UC.3DE.Linux IBM Informix Dynamic Server Version 10.00.FC4 PDO_INFORMIX driver 1.2.6 Reproduce code: --------------- mypdo1.php [using bindValue(...), DON'T WORK] <? $Pdo = new PDO('informix: host=myhost; server=myserver; protocol=onsoctcp; service=11000; database=empleados', 'user', 'password'); $Stmt = $Pdo->prepare('EXECUTE PROCEDURE test(?)'); $Stmt->bindValue(1, $sString); $sString = "myString"; $Stmt->execute(); $aRow = $Stmt->fetch(PDO::FETCH_NUM); echo '<pre>'; var_dump($aRow); echo '</pre>'; ?> mypdo2.php [using direct value in sql query, IT WORK] <? $Pdo = new PDO('informix: host=myhost; server=myserver; protocol=onsoctcp; service=11000; database=empleados', 'user', 'password'); $Stmt = $Pdo->prepare('EXECUTE PROCEDURE test("myString")'); $Stmt->execute(); $aRow = $Stmt->fetch(PDO::FETCH_NUM); echo '<pre>'; var_dump($aRow); echo '</pre>'; ?> Expected result: ---------------- Same result in both scripts array(2) { [0]=> string(9) "JARAMILLO" [1]=> string(3) "LEO" } Actual result: -------------- mypdo1.php array(2) { [0]=> NULL [1]=> NULL } mypdo2.php array(2) { [0]=> string(9) "JARAMILLO" [1]=> string(3) "LEO" } -- Edit bug report at http://pecl.php.net/bugs/bug.php?id=16074&edit=1 --

« previous php.pear.webmaster (#6490) next »