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).
This commit is contained in:
10
config.php-dist
Executable file → Normal file
10
config.php-dist
Executable file → Normal file
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user