Bug #73757 [NEW]: Slow connection when using localhost as DSN
| From: | binarskugga at gmail dot com | Date: | Fri, 16 Dec 2016 07:59:07 +0000 |
| Subject: | Bug #73757 [NEW]: Slow connection when using localhost as DSN | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-206051@lists.php.net to get a copy of this message | ||
From: binarskugga at gmail dot com
Operating system: Windows
PHP version: 7.1.0
Package: PDO MySQL
Bug Type: Bug
Bug description:Slow connection when using localhost as DSN
Description:
------------
---
From manual page: http://www.php.net/pdo.construct
---
When connecting to PDO using the DSN, it is painfully slow on local if
you're using "localhost". This can be fixed by using 127.0.0.1 at the
moment.
Test script:
---------------
<?php
try {
$pdo = new PDO(mysql:dbname=foo;host=localhost;port=3306",
$config["SQL"]["USER"], $config["SQL"]["PASSWORD"]);
} catch(PDOException $exception) {
die("Couldn't access SQL engine. (" . $exception->getMessage() .
")");
}
?>
--
Edit bug report at https://bugs.php.net/bug.php?id=73757&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73757&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73757&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73757&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73757&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73757&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73757&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73757&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73757&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73757&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73757&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73757&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73757&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73757&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73757&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73757&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73757&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73757&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73757&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73757&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73757&r=mysqlcfg