thekid/xp-framework — comment on commit 8a2111d03c9f07821dcd4de5f559588e40382984
File: core/src/main/php/rdbms/mysql/MySQLConnection.class.php line 74
By thekid:

This is a workaround for the problem in PHP's mysql extension which recognizes host name strings with `:` **and** `/` in the beginning as sockets. That's OK for `:/tmp/mysql.sock` but not for Windows pipe names which need to be passed "raw", meaning neither with a leading slash nor prefixed by \\.\pipe\. See http://lxr.php.net/opengrok/xref/PHP_5_2/ext/mysql/php_mysql.c#595 and following. Use a **trick** - the ini setting `mysql.default_socket` will be taken as value for `mysql_real_connect()`'s socket parameter as-is. Reset this back after connecting.