From: capile at tecnodz dot com Operating system: Ubuntu Linux PHP version: 5.4.13 Package: PDO related Bug Type: Bug Bug description:After first query to MSSQL (DBLIB) all the other queries return null values
Description: ------------ After first statement/query/exec (successful or not) all the other statements return null as a result. There's nothing relevant in the PDOStatement::errorInfo(). Occurs no matter if the statement cursor was closed or not. Tested on: * Ubuntu 12.10 with both PHP 5.4.6 and 5.4.13 (doesn't work) * Ubuntu 13.04 with PHP 5.4.9 (doesn't work) * Ubuntu 12.04 with PHP 5.3.10 (works) All the installations were made with apt-get (PHP 5.4.13 from http://ppa.launchpad.net/ondrej/php5/ubuntu). All of them use the PDO version 1.0.4dev (got with `php --re pdo`) Test script: --------------- $pdo=new PDO('dblib:host=db;dbname=admin;charset=UTF-8',$username,$password); $statement=$pdo->query('select 1+1 as result'); print_r($statement->fetchAll()); $statement->closeCursor(); $statement=$pdo->query('select 1+1 as result'); print_r($statement->fetchAll()); Expected result: ---------------- Array ( [0] => Array ( [result] => 2 [0] => 2 ) ) Array ( [0] => Array ( [result] => 2 [0] => 2 ) ) Actual result: -------------- Array ( [0] => Array ( [result] => 2 [0] => 2 ) ) Array ( ) -- Edit bug report at https://bugs.php.net/bug.php?id=64522&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64522&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64522&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64522&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=64522&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=64522&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=64522&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=64522&r=needscript Try newer version: https://bugs.php.net/fix.php?id=64522&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=64522&r=support Expected behavior: https://bugs.php.net/fix.php?id=64522&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=64522&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=64522&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=64522&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64522&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=64522&r=dst IIS Stability: https://bugs.php.net/fix.php?id=64522&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=64522&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=64522&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=64522&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=64522&r=mysqlcfg