From 5c6a36c1897a521f3d81c5b116ba0b69c5cf5296 Mon Sep 17 00:00:00 2001 From: Yuri Salimovskiy Date: Wed, 25 Oct 2023 12:00:12 +0300 Subject: [PATCH 1/2] config file docs --- docs/config/config.md | 86 +++++++++++++++++++++++ docs/toc_sections/_advanced_usage_toc.yml | 2 + 2 files changed, 88 insertions(+) create mode 100644 docs/config/config.md diff --git a/docs/config/config.md b/docs/config/config.md new file mode 100644 index 000000000..fbab1442b --- /dev/null +++ b/docs/config/config.md @@ -0,0 +1,86 @@ + + +# Main Configuration File + +The main configuration settings are stored in the for of PHP array in `system/user/config/config.php` file. + +This file is populated automatically during the installation process and contains the most important settings that are used by ExpressionEngine. + +The main configuration file is being loaded every time the system is run, meaning that [config overrides](general/system-configuration-overrides.md) set in `config.php`` always affect the system’s configuration. + +At the minimum, the configuration file contains the following settings: + +#### `app_version` + +The installation's ExpressionEngine version. This value is set automatically and normally should not be modified. + +However if for a certain reason you need to run the update script again, you can change this value to a lower version number so the system would "see" the update available. + + $config['app_version'] = '7.4.0'; + +#### `encryption_key` + +This is the secret key used by the [Encrypt service](development/services/encrypt.md) to protected sensitive data in the database. It is set automatically during the installation process. If you need to use your own key please refer to [Troubleshooting guide](troubleshooting/error-messages.md#generating-new-encryption-keys) on how to generate a new one. + + $config['encryption_key'] = '26791dcd5c7cc9e569cc05b16b96235985cc9f03'; + +#### `session_crypt_key` + +Similar to `encryption_key`, but used to protected session data. + + $config['session_crypt_key'] = 'd9e776dc9a5de0cd83e7c76a76756daa64ff4b8b'; + +#### `database` + +This is probably most important setting in the configuration file. It contains the database connection details. The array is required to have element with key `expressionengine`, which in turn needs to be array with the following keys: + + - `hostname` - The hostname or IP address of database server + - `database` - The name of the database to connect to + - `username` - The username used to connect to the database + - `password` - The password used to connect to the database + - `dbprefix` - The prefix used for all database tables (default is `exp_`) + - `char_set` - The character set used in communicating with the database (default is `utf8mb4`) + - `dbcollat` - The character collation used in communicating with the database (default is `utf8mb4_unicode_ci`) + - `port` - The port used to connect to the database (default is `3306`) + + ```php + $config['database'] = array( + 'expressionengine' => array( + 'hostname' => 'localhost', + 'database' => 'ee740', + 'username' => 'root', + 'password' => '', + 'dbprefix' => 'exp_', + 'char_set' => 'utf8mb4', + 'dbcollat' => 'utf8mb4_unicode_ci', + 'port' => '' + ), + ); + ``` + +In addition, you can use following keys inside `expressionengine`: + + - `pconnect` - Whether to use persistent connections (default is `true`) + +The following keys can be specified that will be converted to [PDO constants](https://www.php.net/manual/en/ref.pdo-mysql.php#pdo-mysql.constants) and passed to the database driver: + + - `MYSQL_ATTR_LOCAL_INFILE` + - `MYSQL_ATTR_LOCAL_INFILE_DIRECTORY` + - `MYSQL_ATTR_READ_DEFAULT_FILE` + - `MYSQL_ATTR_READ_DEFAULT_GROUP` + - `MYSQL_ATTR_MAX_BUFFER_SIZE` + - `MYSQL_ATTR_INIT_COMMAND` + - `MYSQL_ATTR_COMPRESS` + - `MYSQL_ATTR_SSL_CA` + - `MYSQL_ATTR_SSL_CAPATH` + - `MYSQL_ATTR_SSL_CERT` + - `MYSQL_ATTR_SSL_CIPHER` + - `MYSQL_ATTR_SSL_KEY` + - `MYSQL_ATTR_SSL_VERIFY_SERVER_CERT` \ No newline at end of file diff --git a/docs/toc_sections/_advanced_usage_toc.yml b/docs/toc_sections/_advanced_usage_toc.yml index 2d4fb8191..45699e060 100644 --- a/docs/toc_sections/_advanced_usage_toc.yml +++ b/docs/toc_sections/_advanced_usage_toc.yml @@ -7,6 +7,8 @@ - name: Config Files items: + - name: Main Configuration File + href: config/config.md - name: System Config Overrides href: general/system-configuration-overrides.md - name: Additional Config Files From e1a8d0e9f075b7f03361fbd253e5877bc4d8244d Mon Sep 17 00:00:00 2001 From: Bryan Nielsen Date: Thu, 8 Feb 2024 13:37:20 -0500 Subject: [PATCH 2/2] Update config.md --- docs/config/config.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/config/config.md b/docs/config/config.md index fbab1442b..444483ab8 100644 --- a/docs/config/config.md +++ b/docs/config/config.md @@ -9,39 +9,39 @@ # Main Configuration File -The main configuration settings are stored in the for of PHP array in `system/user/config/config.php` file. +The main configuration settings are stored in the form of a PHP array in the `system/user/config/config.php` file. This file is populated automatically during the installation process and contains the most important settings that are used by ExpressionEngine. -The main configuration file is being loaded every time the system is run, meaning that [config overrides](general/system-configuration-overrides.md) set in `config.php`` always affect the system’s configuration. +Settings from this file are loaded every time the system is run. This means that [config overrides](general/system-configuration-overrides.md) set in `config.php` always affect the system’s configuration. -At the minimum, the configuration file contains the following settings: +At a minimum, this configuration file contains the following settings: #### `app_version` The installation's ExpressionEngine version. This value is set automatically and normally should not be modified. -However if for a certain reason you need to run the update script again, you can change this value to a lower version number so the system would "see" the update available. +However if you need to run an update script again, you can modify this value to a lower version number so the system would "see" the update(s) available. $config['app_version'] = '7.4.0'; #### `encryption_key` -This is the secret key used by the [Encrypt service](development/services/encrypt.md) to protected sensitive data in the database. It is set automatically during the installation process. If you need to use your own key please refer to [Troubleshooting guide](troubleshooting/error-messages.md#generating-new-encryption-keys) on how to generate a new one. +This is the secret key used by the [Encrypt service](development/services/encrypt.md) to protect sensitive data in the database. It is set automatically during the installation process. If you need to use your own key please refer to [Troubleshooting guide](troubleshooting/error-messages.md#generating-new-encryption-keys) on how to generate a new one. $config['encryption_key'] = '26791dcd5c7cc9e569cc05b16b96235985cc9f03'; #### `session_crypt_key` -Similar to `encryption_key`, but used to protected session data. +Similar to the `encryption_key`, but used to protected session data. $config['session_crypt_key'] = 'd9e776dc9a5de0cd83e7c76a76756daa64ff4b8b'; #### `database` -This is probably most important setting in the configuration file. It contains the database connection details. The array is required to have element with key `expressionengine`, which in turn needs to be array with the following keys: +The database connection details are one of the most important settings in the configuration file. The array is required to have an element with a key of `expressionengine`, which in turn needs to be an array with the following keys: - - `hostname` - The hostname or IP address of database server + - `hostname` - The hostname or IP address of your database server - `database` - The name of the database to connect to - `username` - The username used to connect to the database - `password` - The password used to connect to the database @@ -69,7 +69,7 @@ In addition, you can use following keys inside `expressionengine`: - `pconnect` - Whether to use persistent connections (default is `true`) -The following keys can be specified that will be converted to [PDO constants](https://www.php.net/manual/en/ref.pdo-mysql.php#pdo-mysql.constants) and passed to the database driver: +The following keys can be specified and will be converted to [PDO constants](https://www.php.net/manual/en/ref.pdo-mysql.php#pdo-mysql.constants) when passed to the database driver: - `MYSQL_ATTR_LOCAL_INFILE` - `MYSQL_ATTR_LOCAL_INFILE_DIRECTORY` @@ -83,4 +83,4 @@ The following keys can be specified that will be converted to [PDO constants](ht - `MYSQL_ATTR_SSL_CERT` - `MYSQL_ATTR_SSL_CIPHER` - `MYSQL_ATTR_SSL_KEY` - - `MYSQL_ATTR_SSL_VERIFY_SERVER_CERT` \ No newline at end of file + - `MYSQL_ATTR_SSL_VERIFY_SERVER_CERT`