From: aspen dot olmsted at alliance dot biz Operating system: Windows XP SP2 PHP version: 5CVS-2006-10-12 (snap) PHP Bug Type: PDO related Bug description: Only one prepared statement allowed per pdo object
Description: ------------ If I try to open a 2nd statement handle against prepared statement on SQL 2000 and windows the 2nd attempt will fail. I can create a new object per statement and it is fine. The problem is only happening on prepared stored procedures. If I prepare a sql statement it seems fine. Reproduce code: --------------- $stmt = $dbh->prepare("exec pdo_test"); $stmt->execute(); echo $x . " " . var_dump($stmt->fetch()) . "<br>"; // $stmt = null; $stmt2 = $dbh->prepare("exec pdo_test"); $stmt2->execute(); echo $x . " " . var_dump($stmt2->fetch()) . "<br>"; Here is the sql to create SP: create procedure pdo_test as select 'Hello' msg Expected result: ---------------- Hoping both statements would print the array with Hello in it Actual result: -------------- The second result will print false. If I uncomment the $stmt = null; then everything works great. -- Edit bug report at http://bugs.php.net/?id=39141&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39141&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39141&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39141&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39141&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39141&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39141&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39141&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39141&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39141&r=support Expected behavior: http://bugs.php.net/fix.php?id=39141&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39141&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39141&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39141&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39141&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39141&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39141&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39141&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39141&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39141&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39141&r=mysqlcfg