aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba/dba_driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/dba/dba_driver.php')
-rwxr-xr-xinclude/dba/dba_driver.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php
index b4cda6d8e..afe209feb 100755
--- a/include/dba/dba_driver.php
+++ b/include/dba/dba_driver.php
@@ -53,7 +53,14 @@ class DBA {
}
else {
- if(!($port))
+
+ // attempt to use the pdo driver compiled-in mysqli socket
+ // if using 'localhost' with no port configured.
+ // If this is wrong you'll need to set the socket path specifically
+ // using a server name of 'mysql:unix_socket=/socket/path', setting /socket/path
+ // as needed for your platform
+
+ if((!($port)) && ($server !== 'localhost'))
$port = 3306;
}