Hi all.
Today I broke my site, and got it back again. However in doing so, I was manually configuring the config.inc.php file, and I noticed something a little strange.
For example we have settings like this:
$database_type = 'mysql';
$database_server = 'db.server.com';
$database_user = 'database_user';
$database_password = '$password!';
$database_connection_charset = 'utf8';
$dbase = 'database_name';
$table_prefix = 'modx_';
However, when we get to $database_dsn we find that it repeats the same content, only manually entered again.
$database_dsn = 'mysql:host=db.server.com;dbname=database_name;charset=utf8';
Why isn't it defined like the following instead using the previously defined variables?
$database_dsn = 'mysql:host=' . $database_server . ';dbname=' . $dbase . ';charset=' . $database_connection_charset;
[ed. note: vrdriver last edited this post 11 years ago.]