Bug #60155 [Opn->Csd]: pdo_mysql.default_socket ignored
| From: | johannes@php.net | Date: | Wed, 02 Nov 2011 15:46:39 +0000 |
| Subject: | Bug #60155 [Opn->Csd]: pdo_mysql.default_socket ignored | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-164816@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60155&edit=1
ID: 60155
Updated by: johannes@php.net
Reported by: gnoodl+php at gmail dot com
Summary: pdo_mysql.default_socket ignored
-Status: Open
+Status: Closed
Type: Bug
Package: PDO related
Operating System: Linux (Ubuntu)
PHP Version: 5.3.8
-Assigned To:
+Assigned To: johannes
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
This option existed always but has only been used with myslqnd. Works for libmysql now, too.
Previous Comments:
------------------------------------------------------------------------
[2011-11-02 15:45:48] johannes@php.net
Automatic comment from SVN on behalf of johannes
Revision: http://svn.php.net/viewvc/?view=revision&revision=318696
Log: - Fix bug #60155 (pdo_mysql.default_socket ignored).
------------------------------------------------------------------------
[2011-10-28 01:22:48] gnoodl+php at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=60155&edit=1