ID: 44081 User updated by: abouzekry at gmail dot com Reported By: abouzekry at gmail dot com -Status: No Feedback +Status: Open Bug Type: PDO related Operating System: Windows XP SP2 -PHP Version: 5.2.8 +PHP Version: 5.2.9 New Comment:
the bug wasn't resolved in the latest code snapshot, it's more than a year now!!! Previous Comments: ------------------------------------------------------------------------ [2009-05-08 20:11:04] xfurious at gmail dot com Unless I'm losing my mind, this is happening on PHP 5.2.9-2/windows as well. ------------------------------------------------------------------------ [2009-05-03 01:00:09] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2009-04-25 14:54:25] j...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [2009-02-25 14:18:04] stewart dot duncan at rocketmail dot com Really annoying this one. Reproduced on 5.2.8. ------------------------------------------------------------------------ [2008-02-09 11:46:41] abouzekry at gmail dot com Description: ------------ the same code runs on php5.2.0 without any problems, while it's problematic with php5.2.5 i don't know why!, it insists on giving me the following message... Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute however i closed the cursor after each result fetch!!!! Reproduce code: --------------- if(isset($_POST['user_name'], $_POST['pass'])) { /* check wether the user exists or not */ $result = $db->query("CALL proc_check_user('{$_POST['user_name']}', '{$_POST['pass']}')") or die('0-1-Database-Query-Error-login.php:'.print_r($db->errorInfo())); $row = $result->fetchAll(PDO::FETCH_ASSOC) or die('0-2-Database-Fetch-Error-login.php:'.print_r($db->errorInfo())); /* close the DB cursor to be able to perform the other querie(s)*/ $result->closeCursor(); /* if the user doesn't exist exit prematurely! */ if($row['userExists'] == 0) { exit('0-2-Authentication-Error-login.php: User Doesnt Exist!'); } /* get the user_id and full_name */ $result = $db->query("CALL proc_get_user_data('{$_POST['user_name']}', '{$_POST['pass']}')") or die('0-3-Database-Query-Error-login.php:'.print_r($db->errorInfo())); $row = $result->fetch(PDO::FETCH_ASSOC); } Expected result: ---------------- the machine with php5.2.0 installed when running the same code produces a correct authentication for valid users (POSTed) and error for invalid users. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44081&edit=1