#39053 [Opn->Fbk]: errorInfo not populated for connect error

From: Date: Thu, 05 Oct 2006 20:30:46 +0000
Subject: #39053 [Opn->Fbk]: errorInfo not populated for connect error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-103164@lists.php.net to get a copy of this message
ID: 39053 Updated by: tony2001@php.net Reported By: xing at mac dot com -Status: Open +Status: Feedback Bug Type: PDO related Operating System: Linux PHP Version: 5CVS-2006-10-05 (snap) New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2006-10-05 20:23:10] xing at mac dot com Description: ------------ When pdo connect fails, the pdoexception object field "errorInfo" is properly set. Mysql 5.0.24a PHP 5.2snap Reproduce code: --------------- Use pdo to a non-existing mysql server. Catch and print_r() exception. Expected result: ---------------- ...pdo exception snippet... [errorInfo] => Array ( [0] => HY000 [1] => 2003 [2] => Can't connect to MySQL server on '1276.0.0.86' (111) ) Actual result: -------------- [errorInfo] => (empty errorInfo property) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39053&edit=1

« previous php.bugs (#103164) next »