Bug #68750 [Fbk->Opn]: PDOMysql with mysqlnd does not allow the usage of named pipes
| From: | steffen at howarts dot info | Date: | Mon, 12 Jan 2015 12:26:53 +0000 |
| Subject: | Bug #68750 [Fbk->Opn]: PDOMysql with mysqlnd does not allow the usage of named pipes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-189898@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68750&edit=1
ID: 68750
User updated by: steffen at howarts dot info
Reported by: steffen at howarts dot info
Summary: PDOMysql with mysqlnd does not allow the usage of
named pipes
-Status: Feedback
+Status: Open
Type: Bug
Package: PDO MySQL
Operating System: Windows 8.1 6.3.9600
PHP Version: 5.6.4
Block user comment: N
Private report: N
New Comment:
It not really is when the mysqlnd driver is expecting it as such:
The variable in mysqlnd.c is explicitly named: "socket_or_pipe"
The whole mysql source tree shows this pattern as using the unix_socket as named pipe under windows.
Previous Comments:
------------------------------------------------------------------------
[2015-01-12 11:55:04] ab@php.net
Hi,
thanks for the patch. For the functionality it looks plausible, but I think using the
"unix_socket" to pass a pipe is misleading. This should be called accordingly like
"pipe" and only be available on Windows. But with such a change it'd probably aim
master.
Thanks.
------------------------------------------------------------------------
[2015-01-05 15:54:41] steffen at howarts dot info
Description:
------------
Mysql Server configured so that you can't use the default socket:
[mysqld]
skip-networking
socket=abcdef
Connecting like isn't possible:
//this is the way it works with libmysql (with patch):
new PDO("mysql:host=.;unix_socket=abcdef")
//this is the way how it works with mysqlnd (with patch):
//This seems to be very slow (5000ms without networking, while
//libmysql results in 20ms - which is probably a different bug)
new PDO("mysql:host=.;unix_socket=\\\\.\\pipe\\abcdef")
TLDR: The bug is that PDO mysql only checks
for the unix-specific case of 127.0.0.1
while mysqlnd expects an explicit . for windows named pipes.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68750&edit=1