From: ghxter at gmail dot com Operating system: Windows 7 X86 PHP version: 5.3.1 PHP Bug Type: PDO related Bug description: PDO_Mysql Not work.
Description: ------------ Mysql Code: try{ $dbh = new PDO('mysql:host=localhost;dbname=test', 'root', ''); var_dump($dbh); } catch(Exception $e) { echo $e->getMessage(); } Error Info: SQLSTATE[HY000] [2002] ÓÉÓÚÁ¬½Ó·½ÔÚÒ»¶Îʱ¼äºóûÓÐÕýÈ·´ð¸´»òÁ¬½ÓµÄÖ÷»úûÓз´Ó¦£¬Á¬½Ó³¢ÊÔʧ°Ü¡£ Env: Windows7x86 + Mysql5.1.41 + nginx0.7.63. I tested from php5.2.6 to php.5.2.11 And php5.3.0 are work. but php.5.3.1 and php.5.3.2 are not work. Reproduce code: --------------- try{ $dbh = new PDO('mysql:host=localhost;dbname=test', 'root', ''); var_dump($dbh); } catch(Exception $e) { echo $e->getMessage(); } Expected result: ---------------- ---------- PHPTest ---------- object(PDO)#1 (0) { } Actual result: -------------- ---------- PHPTest ---------- SQLSTATE[HY000] [2002] ÓÉÓÚÁ¬½Ó·½ÔÚÒ»¶Îʱ¼äºóûÓÐÕýÈ·´ð¸´»òÁ¬½ÓµÄÖ÷»úûÓз´Ó¦£¬Á¬½Ó³¢ÊÔʧ°Ü¡£ -- Edit bug report at http://bugs.php.net/?id=50357&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50357&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50357&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50357&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50357&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50357&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50357&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50357&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50357&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50357&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50357&r=support Expected behavior: http://bugs.php.net/fix.php?id=50357&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50357&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50357&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50357&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50357&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50357&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50357&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50357&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50357&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50357&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50357&r=mysqlcfg