Bug #60155 [NEW]: pdo_mysql.default_socket ignored
| From: | gnoodl+php at gmail dot com | Date: | Fri, 28 Oct 2011 01:22:48 +0000 |
| Subject: | Bug #60155 [NEW]: pdo_mysql.default_socket ignored | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-164629@lists.php.net to get a copy of this message | ||
From:
Operating system: Linux (Ubuntu)
PHP version: 5.3.8
Package: PDO related
Bug Type: Bug
Bug description:pdo_mysql.default_socket ignored
Description:
------------
The
pdo_mysql.default_socket configuration setting is ignored when
creating a
PDO MySQL connection to "localhost"
On my system, pdo_mysql.default_socket is set to
"/var/run/mysqld/mysqld.sock"
I've created a proof of concept here -
http://staging.philipbrown.id.au/pdo-
test.php
Test script:
---------------
$db = new PDO('mysql:host=localhost;dbname=test', 'pdotest',
'pdotest');
echo $db->getAttribute(PDO::ATTR_SERVER_VERSION);
Expected result:
----------------
Expect to see MySQL server version, eg "5.1.37-1ubuntu5.5"
Actual result:
--------------
PDOException with message "SQLSTATE[HY000] [2002] Can't connect to local
MySQL
server through socket '/tmp/mysql.sock' (2)"
--
Edit bug report at https://bugs.php.net/bug.php?id=60155&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60155&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60155&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60155&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=60155&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60155&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=60155&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=60155&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=60155&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=60155&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=60155&r=support
Expected behavior: https://bugs.php.net/fix.php?id=60155&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=60155&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=60155&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=60155&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60155&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=60155&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=60155&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=60155&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=60155&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=60155&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=60155&r=mysqlcfg