summaryrefslogtreecommitdiff
path: root/config.php-dist
diff options
context:
space:
mode:
authorJustAMacUser <[email protected]>2020-04-21 21:10:32 -0400
committerJustAMacUser <[email protected]>2020-04-21 21:10:32 -0400
commit9c3cf60592d99494903184c268581dd18cf5b353 (patch)
treed3a6418389fd3ed223c0edc5a07e2757a1280cff /config.php-dist
parent11a9d3bd9be1dcbf5177baa9846770012da3ce8b (diff)
More fixes when installer generates config file.
* Use single quotes in config.php when when defining database values so PHP doesn't interpret `$` as a variable (mostly for the password constant). * Use `addcslashes` instead of `addslashes` and only escape backslash and single quotes. * Do not convert DB_PORT to integer if leaving it blank (the default).
Diffstat (limited to 'config.php-dist')
-rw-r--r--[-rwxr-xr-x]config.php-dist10
1 files changed, 5 insertions, 5 deletions
diff --git a/config.php-dist b/config.php-dist
index e83fdcfdc..824c378a7 100755..100644
--- a/config.php-dist
+++ b/config.php-dist
@@ -3,11 +3,11 @@
// *** Database configuration (important!) ***
// *******************************************
- define('DB_TYPE', "%DB_TYPE"); // pgsql or mysql
- define('DB_HOST', "%DB_HOST");
- define('DB_USER', "%DB_USER");
- define('DB_NAME', "%DB_NAME");
- define('DB_PASS', "%DB_PASS");
+ define('DB_TYPE', '%DB_TYPE'); // pgsql or mysql
+ define('DB_HOST', '%DB_HOST');
+ define('DB_USER', '%DB_USER');
+ define('DB_NAME', '%DB_NAME');
+ define('DB_PASS', '%DB_PASS');
define('DB_PORT', '%DB_PORT'); // usually 5432 for PostgreSQL, 3306 for MySQL
define('MYSQL_CHARSET', 'UTF8');