@robocoder opened this issue on March 18th 2009

Piwik support for unix sockets is kludgey. The unix socket is configured (embedded in) the host setting:

host = "localhost;unix_socket=/path"

This results in a DSN that looks like "host=localhost;unix_socket=/path;port=3306".

For now, this appears to work, but according to PHP docs (http://www.php.net/manual/en/ref.pdo-mysql.connection.php), unix_socket "shouldn't be used with host or port" in the PDO DSN. (The implication is that while this works now, this may not be the case in the future.)

In core/Tracker/Db.php, I propose: (I omit the drivername and dbname to simplify the pseudocode)

if (host[0] == '/') {
   dsn = "unix_socket=$host";
} else {
   dsn = "host=$host;port=$port";
@robocoder commented on March 19th 2009

(In [991]) Fix #614 - MySQL unix socket support

This issue was closed on March 19th 2009
Powered by GitHub Issue Mirror