Hi,
On 02/12/2013 12:51 PM, Asbjørn Sannes wrote:
https://wiki.php.net/rfc/mysqlnd_localhost_override
I propose we introduce a new option called mysqlnd.localhost_override
which enables a system administrator or php distributor to configure how
localhost should be overridden.
I am definitely -1 localhost to be redefined to TCP. It is known since
ages that for MySQL localhost on *nix is resolved to Unix Socket.
I suppose that actual global variable is not needed, as no mysql
extension, to my knowledge uses one for such a thing. mysqli has an ini
option default_socket, but it is used when NULL or "" is provided as
socket name, when doing the connect.
All three extensions know how to use
--with-mysql-sock=DIR MySQL/MySQLi/PDO_MYSQL: Location of the MySQL
unix socket pointer. If unspecified, the default locations are searched
So, a possible solution is to enable mysqlnd to use this configure
setting too, thus allowing non-patched sources to be built by the
distributions.
I believe it would make life easier on system administrators and
distributions with varying defaults.
Working patch at:
https://github.com/php/php-src/pull/275
It is backward compatible by falling back to earlier behaviour if
mysqlnd.localhost_override is not set
Any comments welcome.
Best,
Andrey
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php