|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patch mysqlnd-sock.patch for MySQL related Bug #60748Patch version 2012-01-13 16:56 UTC Return to Bug #60748 | Download this patchThis patch is obsolete Obsoleted by patches: Patch Revisions:Developer: fedora@famillecollet.com
diff -up php-5.4.0RC5/ext/mysqlnd/mysqlnd.c.sock php-5.4.0RC5/ext/mysqlnd/mysqlnd.c
--- php-5.4.0RC5/ext/mysqlnd/mysqlnd.c.sock 2012-01-01 14:15:04.000000000 +0100
+++ php-5.4.0RC5/ext/mysqlnd/mysqlnd.c 2012-01-13 17:27:58.808947693 +0100
@@ -695,7 +695,11 @@ MYSQLND_METHOD(mysqlnd_conn_data, connec
if (host_len == sizeof("localhost") - 1 && !strncasecmp(host, "localhost", host_len)) {
DBG_INF_FMT("socket=%s", socket_or_pipe? socket_or_pipe:"n/a");
if (!socket_or_pipe) {
- socket_or_pipe = "/tmp/mysql.sock";
+#ifdef PHP_MYSQL_UNIX_SOCK_ADDR
+ socket_or_pipe = PHP_MYSQL_UNIX_SOCK_ADDR;
+#else
+ socket_or_pipe = "/var/lib/mysql/mysql.sock";
+#endif
}
transport_len = mnd_sprintf(&transport, 0, "unix://%s", socket_or_pipe);
unix_socket = TRUE;
diff -up ext/pdo_mysql/pdo_mysql.c.sock ext/pdo_mysql/pdo_mysql.c
|
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 10 23:00:02 2025 UTC |