|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39171 pdo_mysql configure script sets empty default socket
Submitted: 2006-10-16 20:31 UTC Modified: 2008-08-21 01:00 UTC
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: spam02 at pornel dot net Assigned: mysql (profile)
Status: No Feedback Package: MySQL related
PHP Version: 5CVS, 6CVS (2008-08-11) OS: *
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-10-16 20:31 UTC] spam02 at pornel dot net
I've ran onto problem described in bug #34988

I aknowledge that there is workaround by setting appropriate socket in DSN, however the root cause is that PHP defaults to socket='', which certainly won't work. 

If proper socket can't be found, it would be wiser to fall back to built-in default or fail configure script and require user to supply socket via something like --with-pdo-mysql-socket.

Requirement to use unix_socket in DSN ties code with machine-dependent configuration and AFAIK it's not possible to find that PDO has empty string for default socket without connection attempt - that makes it imperfect workaround.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-16 20:37 UTC] spam02 at pornel dot net
Sorry, I've given wrong bug # in my report. The orignal issue was that PDO fails with:

"Can't connect to local MySQL server through socket '' (2)"
 [2008-08-12 16:24 UTC]
Assigned to the maintainer.
 [2008-08-13 11:44 UTC]
Please try using this CVS snapshot:
For Windows (zip):

For Windows (installer):

We did quite a few changes to PDO_mysql in 5.3.
 [2008-08-21 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 23 18:01:30 2024 UTC