ID: 39331 Updated by: [EMAIL PROTECTED] Reported By: guidi dot luca at gmail dot com -Status: Open +Status: Bogus Bug Type: PDO related Operating System: Linux 2.6.16.13-4-smp oSuSE10.1 PHP Version: 5CVS-2006-11-01 (snap) New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php PDO class failed to instantiate (connection failed) so you don't have a PDO object. Calling methods from a non-object results in a fatal error. Previous Comments: ------------------------------------------------------------------------ [2006-11-01 13:38:17] guidi dot luca at gmail dot com Description: ------------ PDO prepare function crash but don't display any error. i use: PDO Driver for MySQL, client library version 5.0.18 Reproduce code: --------------- $pdo = new PDO("mysql:host=localhost;dbname=myDb","myUser","myPass"); $stmt = $pdo->prepare('select username from users where id = ?'); $stmt->execute( array(123) ); $results = $stmt->fetchAll(); Expected result: ---------------- A statement execution Actual result: -------------- Fatal error: Call to a member function execute() on a non-object in /srv/www/htdocs/index.php on line 21 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39331&edit=1