You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 PDODSN. (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)
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 (host0 == ‘/’) {
dsn = “unix_socket=$host”;
} else {
dsn = “host=$host;port=$port”;
}
```
The text was updated successfully, but these errors were encountered: