aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-10-16 13:05:40 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-10-16 13:05:40 -0700
commit7fe6bc52d089570994074c4fbb19428d7cc58e6d (patch)
tree4e3e085546aa11f3f4c655009a06d72de34f02e3
parent52f2509280af0826271e163b8adb980e792b20e3 (diff)
downloadvolse-hubzilla-7fe6bc52d089570994074c4fbb19428d7cc58e6d.tar.gz
volse-hubzilla-7fe6bc52d089570994074c4fbb19428d7cc58e6d.tar.bz2
volse-hubzilla-7fe6bc52d089570994074c4fbb19428d7cc58e6d.zip
change setup defaults to 127.0.0.1 instead of localhost for DB server, add documentation to the INSTALL.txt explaining the choice.
-rw-r--r--install/INSTALL.txt7
-rwxr-xr-xmod/setup.php6
2 files changed, 9 insertions, 4 deletions
diff --git a/install/INSTALL.txt b/install/INSTALL.txt
index 65df17fdd..c81510522 100644
--- a/install/INSTALL.txt
+++ b/install/INSTALL.txt
@@ -147,7 +147,12 @@ use SSL, your webserver must not listen on port 443 at all.
3. Create an empty database and note the access details (hostname, username,
-password, database name).
+password, database name). The MySQL client libraries will fallback to socket
+communication if the hostname is 'localhost' and some people have reported
+issues with the socket implementation. Use it if your requirements mandate.
+Otherwise if the database is served on the local server, use '127.0.0.1' for
+the hostname. See https://dev.mysql.com/doc/refman/5.0/en/connecting.html
+for more information.
4. If you know in advance that it will be impossible for the web server to
write or create files in your web directory, create an empty file called
diff --git a/mod/setup.php b/mod/setup.php
index 15820f14e..e5ac25965 100755
--- a/mod/setup.php
+++ b/mod/setup.php
@@ -292,7 +292,7 @@ function setup_content(&$a) {
case 2: { // Database config
- $dbhost = ((x($_POST,'dbhost')) ? notags(trim($_POST['dbhost'])) : 'localhost');
+ $dbhost = ((x($_POST,'dbhost')) ? notags(trim($_POST['dbhost'])) : '127.0.0.1');
$dbuser = notags(trim($_POST['dbuser']));
$dbport = intval(notags(trim($_POST['dbport'])));
$dbpass = notags(trim($_POST['dbpass']));
@@ -312,7 +312,7 @@ function setup_content(&$a) {
'$status' => $wizard_status,
- '$dbhost' => array('dbhost', t('Database Server Name'), $dbhost, t('Default is localhost')),
+ '$dbhost' => array('dbhost', t('Database Server Name'), $dbhost, t('Default is 127.0.0.1')),
'$dbport' => array('dbport', t('Database Port'), $dbport, t('Communication port number - use 0 for default')),
'$dbuser' => array('dbuser', t('Database Login Name'), $dbuser, ''),
'$dbpass' => array('dbpass', t('Database Login Password'), $dbpass, ''),
@@ -334,7 +334,7 @@ function setup_content(&$a) {
}; break;
case 3: { // Site settings
require_once('include/datetime.php');
- $dbhost = ((x($_POST,'dbhost')) ? notags(trim($_POST['dbhost'])) : 'localhost');
+ $dbhost = ((x($_POST,'dbhost')) ? notags(trim($_POST['dbhost'])) : '127.0.0.1');
$dbport = intval(notags(trim($_POST['dbuser'])));
$dbuser = notags(trim($_POST['dbuser']));
$dbpass = notags(trim($_POST['dbpass']));