diff --git a/user_guide_src/source/database/configuration.rst b/user_guide_src/source/database/configuration.rst index 2239c65799e2..a0ef5c8cd1d8 100644 --- a/user_guide_src/source/database/configuration.rst +++ b/user_guide_src/source/database/configuration.rst @@ -136,9 +136,9 @@ and decode it in the constructor in the Config class: .. _database-config-explanation-of-values: -********************** -Explanation of Values: -********************** +********************* +Explanation of Values +********************* ================ =========================================================================================================== Name Config Description @@ -159,31 +159,25 @@ Explanation of Values: **pConnect** true/false (boolean) - Whether to use a persistent connection. **DBDebug** true/false (boolean) - Whether to throw exceptions or not when database errors occur. **charset** The character set used in communicating with the database. -**DBCollat** The character collation used in communicating with the database (``MySQLi`` only). +**DBCollat** (``MySQLi`` only) The character collation used in communicating with the database. **swapPre** A default table prefix that should be swapped with ``DBPrefix``. This is useful for distributed applications where you might run manually written queries, and need the prefix to still be customizable by the end user. -**schema** The database schema, default value varies by driver. (Used by ``Postgre`` and ``SQLSRV``.) -**encrypt** Whether or not to use an encrypted connection. - ``SQLSRV`` driver accepts true/false - ``MySQLi`` driver accepts an array with the following options: - * ``ssl_key`` - Path to the private key file - * ``ssl_cert`` - Path to the public key certificate file - * ``ssl_ca`` - Path to the certificate authority file - * ``ssl_capath`` - Path to a directory containing trusted CA certificates in PEM format - * ``ssl_cipher`` - List of *allowed* ciphers to be used for the encryption, separated by colons (``:``) - * ``ssl_verify`` - true/false; Whether to verify the server certificate or not (``MySQLi`` only) -**compress** Whether or not to use client compression (``MySQLi`` only). -**strictOn** true/false (boolean) - Whether to force "Strict Mode" connections, good for ensuring strict SQL - while developing an application (``MySQLi`` only). +**schema** (``Postgre`` and ``SQLSRV`` only) The database schema, default value varies by driver. +**encrypt** (``MySQLi`` and ``SQLSRV`` only) Whether or not to use an encrypted connection. + See :ref:`MySQLi encrypt ` for ``MySQLi`` settings. + ``SQLSRV`` driver accepts true/false. +**compress** (``MySQLi`` only) Whether or not to use client compression. +**strictOn** (``MySQLi`` only) true/false (boolean) - Whether to force "Strict Mode" connections, good for ensuring + strict SQL while developing an application. **port** The database port number - Empty string ``''`` for default port (or dynamic port with ``SQLSRV``). -**foreignKeys** true/false (boolean) - Whether or not to enable Foreign Key constraint (``SQLite3`` only). +**foreignKeys** (``SQLite3`` only) true/false (boolean) - Whether or not to enable Foreign Key constraint. .. important:: SQLite3 Foreign Key constraint is disabled by default. See `SQLite documentation `_. To enforce Foreign Key constraint, set this config item to true. -**busyTimeout** milliseconds (int) - Sleeps for a specified amount of time when a table is locked (``SQLite3`` only). -**numberNative** true/false (boolean) - Whether or not to enable MYSQLI_OPT_INT_AND_FLOAT_NATIVE (``MySQLi`` only). +**busyTimeout** (``SQLite3`` only) milliseconds (int) - Sleeps for a specified amount of time when a table is locked. +**numberNative** (``MySQLi`` only) true/false (boolean) - Whether or not to enable MYSQLI_OPT_INT_AND_FLOAT_NATIVE. ================ =========================================================================================================== .. note:: Depending on what database driver you are using (``MySQLi``, ``Postgre``, @@ -205,4 +199,18 @@ the ``'hostname'`` setting. CodeIgniter's MySQLi driver will notice this and con connection properly. .. literalinclude:: configuration/011.php - :lines: 11-18 \ No newline at end of file + :lines: 11-18 + +.. _mysqli-encrypt: + +encrypt +------- + +MySQLi driver accepts an array with the following options: + +* ``ssl_key`` - Path to the private key file +* ``ssl_cert`` - Path to the public key certificate file +* ``ssl_ca`` - Path to the certificate authority file +* ``ssl_capath`` - Path to a directory containing trusted CA certificates in PEM format +* ``ssl_cipher`` - List of *allowed* ciphers to be used for the encryption, separated by colons (``:``) +* ``ssl_verify`` - true/false; Whether to verify the server certificate or not