From 2ac4177b4b6afc63d594523416c3991d23dddf20 Mon Sep 17 00:00:00 2001 From: Tim Nolte Date: Mon, 8 Jun 2015 11:02:56 -0400 Subject: Added new MySQLi parameters/info to default database config file. Fixed missing new MySQLi parameters from database configuration documentation examples. Signed-off-by: Tim Nolte --- application/config/database.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'application') diff --git a/application/config/database.php b/application/config/database.php index 925b3e504..36ae83dda 100644 --- a/application/config/database.php +++ b/application/config/database.php @@ -43,6 +43,12 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | ['compress'] Whether or not to use client compression (MySQL only) | ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections | - good for ensuring strict SQL while developing +| ['db_options'] Used to set various database connections options and values. (MySQLi only) +| ['ssl_key'] The path name to the key file. (MySQLi only) +| ['ssl_cert'] The path name to the certificate file. (MySQLi only) +| ['ssl_ca'] The path name to the certificate authority file. (MySQLi only) +| ['ssl_capath'] The pathname to a directory that contains trusted SSL CA certificates in PEM format. (MySQLi only) +| ['ssl_cipher'] A list of allowable ciphers to use for SSL encryption. (MySQLi only) | ['failover'] array - A array with 0 or more data for connections if the main should fail. | ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries. | NOTE: Disabling this will also effectively disable both @@ -80,6 +86,12 @@ $db['default'] = array( 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, + 'db_options' => array(), + 'ssl_key' => '', + 'ssl_cert' => '', + 'ssl_ca' => '', + 'ssl_capath' => '', + 'ssl_cipher' => '', 'failover' => array(), 'save_queries' => TRUE ); -- cgit v1.2.3-24-g4f1b From ced557b99cec159a3ad36e497819b8da7f70cd1e Mon Sep 17 00:00:00 2001 From: Tim Nolte Date: Thu, 18 Jun 2015 15:28:43 -0400 Subject: Removed db_options configuration item for implementation later. Changed 5 new MySQLi SSL configuration options to a single ssl_options config item that is an array that will be read to set the individual SSL options. Signed-off-by: Tim Nolte --- application/config/database.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'application') diff --git a/application/config/database.php b/application/config/database.php index 26353cfb2..7baab3fd5 100644 --- a/application/config/database.php +++ b/application/config/database.php @@ -86,12 +86,7 @@ $db['default'] = array( 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, - 'db_options' => array(), - 'ssl_key' => '', - 'ssl_cert' => '', - 'ssl_ca' => '', - 'ssl_capath' => '', - 'ssl_cipher' => '', + 'ssl_options' => array(), 'failover' => array(), 'save_queries' => TRUE ); -- cgit v1.2.3-24-g4f1b From 52ec8252a0cf1c57022fabe7a6d1abd0824f1d90 Mon Sep 17 00:00:00 2001 From: Tim Nolte Date: Thu, 18 Jun 2015 15:33:00 -0400 Subject: Fixed a cleanup miss in the default database config file to follow the recent SSL feature changes. Signed-off-by: Tim Nolte --- application/config/database.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'application') diff --git a/application/config/database.php b/application/config/database.php index 7baab3fd5..20e66eab2 100644 --- a/application/config/database.php +++ b/application/config/database.php @@ -43,12 +43,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | ['compress'] Whether or not to use client compression (MySQL only) | ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections | - good for ensuring strict SQL while developing -| ['db_options'] Used to set various database connections options and values. (MySQLi only) -| ['ssl_key'] The path name to the key file. (MySQLi only) -| ['ssl_cert'] The path name to the certificate file. (MySQLi only) -| ['ssl_ca'] The path name to the certificate authority file. (MySQLi only) -| ['ssl_capath'] The pathname to a directory that contains trusted SSL CA certificates in PEM format. (MySQLi only) -| ['ssl_cipher'] A list of allowable ciphers to use for SSL encryption. (MySQLi only) +| ['ssl_options'] Used to set various SSL options that can be used when making SSL connections. | ['failover'] array - A array with 0 or more data for connections if the main should fail. | ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries. | NOTE: Disabling this will also effectively disable both -- cgit v1.2.3-24-g4f1b From c79a62c5c43c75a3dbc0af77433694340b235047 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 6 Jul 2015 11:21:20 +0300 Subject: [ci skip] Update config/migration.php comments Close #3951 --- application/config/migration.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'application') diff --git a/application/config/migration.php b/application/config/migration.php index 083bf287c..4b585a65c 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -21,12 +21,12 @@ $config['migration_enabled'] = FALSE; | Migration file names may be based on a sequential identifier or on | a timestamp. Options are: | -| 'sequential' = Default migration naming (001_add_blog.php) +| 'sequential' = Sequential migration naming (001_add_blog.php) | 'timestamp' = Timestamp migration naming (20121031104401_add_blog.php) | Use timestamp format YYYYMMDDHHIISS. | -| If this configuration value is missing the Migration library defaults -| to 'sequential' for backward compatibility. +| Note: If this configuration value is missing the Migration library +| defaults to 'sequential' for backward compatibility with CI2. | */ $config['migration_type'] = 'timestamp'; -- cgit v1.2.3-24-g4f1b From 9bb9d072259fead8e4d9693e9b40efc91d5ad7de Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 10 Jul 2015 12:41:25 +0300 Subject: [ci skip] Clarify comments about libraries/drivers autoloading Close #3964 --- application/config/autoload.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'application') diff --git a/application/config/autoload.php b/application/config/autoload.php index 3f0bd24f2..4bc6bf0ad 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -45,8 +45,9 @@ $autoload['packages'] = array(); | ------------------------------------------------------------------- | Auto-load Libraries | ------------------------------------------------------------------- -| These are the classes located in the system/libraries folder -| or in your application/libraries folder. +| These are the classes located in system/libraries/ or your +| application/libraries/ directory, with the addition of the +| 'database' library, which is somewhat of a special case. | | Prototype: | @@ -63,8 +64,9 @@ $autoload['libraries'] = array(); | ------------------------------------------------------------------- | Auto-load Drivers | ------------------------------------------------------------------- -| These classes are located in the system/libraries folder or in your -| application/libraries folder within their own subdirectory. They +| These classes are located in system/libraries/ or in your +| application/libraries/ directory, but are also placed inside their +| own subdirectory and they extend the CI_Driver_Library class. They | offer multiple interchangeable driver options. | | Prototype: -- cgit v1.2.3-24-g4f1b From 7013cd2514b98c168f8edb402792b4d55c0323d6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 13 Jul 2015 11:30:01 +0300 Subject: [ci skip] Update 'ico' entry in config/mimes.php --- application/config/mimes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application') diff --git a/application/config/mimes.php b/application/config/mimes.php index d0e1516ff..1f591ba6b 100644 --- a/application/config/mimes.php +++ b/application/config/mimes.php @@ -154,5 +154,5 @@ return array( 'vcf' => 'text/x-vcard', 'srt' => array('text/srt', 'text/plain'), 'vtt' => array('text/vtt', 'text/plain'), - 'ico' => 'image/x-icon' + 'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon') ); -- cgit v1.2.3-24-g4f1b From 4a4cbb376b1d17a9e74edad8f7cb7f27a50c01c7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 15 Jul 2015 17:39:44 +0300 Subject: [ci skip] Add changelog entries for PR #3828 --- application/config/config.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'application') diff --git a/application/config/config.php b/application/config/config.php index 86ca312b7..f4ba70a4e 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -284,8 +284,15 @@ $config['cache_path'] = ''; | Cache Include Query String |-------------------------------------------------------------------------- | -| Set this to TRUE if you want to use different cache files depending on the -| URL query string. Please be aware this might result in numerous cache files. +| Whether to take the URL query string into consideration when generating +| output cache files. Valid options are: +| +| FALSE = Disabled +| TRUE = Enabled, take all query parameters into account. +| Please be aware that this may result in numerous cache +| files generated for the same page over and over again. +| array('q') = Enabled, but only take into account the specified list +| of query parameters. | */ $config['cache_query_string'] = FALSE; -- cgit v1.2.3-24-g4f1b From 76e643e7e3ebff679407255f66eafae790912f31 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 16 Jul 2015 13:14:49 +0300 Subject: Refactor proposed changes from PR #3896 --- application/config/database.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'application') diff --git a/application/config/database.php b/application/config/database.php index 429b4d48a..656f0c35a 100644 --- a/application/config/database.php +++ b/application/config/database.php @@ -40,6 +40,16 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | Sites using Latin-1 or UTF-8 database character set and collation are unaffected. | ['swap_pre'] A default table prefix that should be swapped with the dbprefix | ['encrypt'] Whether or not to use an encrypted connection. +| +| 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept 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 certificats in PEM format +| 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption +| | ['compress'] Whether or not to use client compression (MySQL only) | ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections | - good for ensuring strict SQL while developing @@ -80,7 +90,6 @@ $db['default'] = array( 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, - 'ssl_options' => array(), 'failover' => array(), 'save_queries' => TRUE ); -- cgit v1.2.3-24-g4f1b From 0785e47152dcb3d3a96c04bc9507eff36a1926c1 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 16 Jul 2015 13:41:55 +0300 Subject: [ci skip] Add note about colon-separated ssl_cipher list --- application/config/database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application') diff --git a/application/config/database.php b/application/config/database.php index 656f0c35a..af29acdc7 100644 --- a/application/config/database.php +++ b/application/config/database.php @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | '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 certificats in PEM format -| 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption +| 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':') | | ['compress'] Whether or not to use client compression (MySQL only) | ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections -- cgit v1.2.3-24-g4f1b From a38b0c45c79f7045d8f322d7727226d3b458956e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 16 Jul 2015 14:25:25 +0300 Subject: Add SSL support for PDO_MYSQL too Related: #3896 --- application/config/database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application') diff --git a/application/config/database.php b/application/config/database.php index af29acdc7..ea345ee79 100644 --- a/application/config/database.php +++ b/application/config/database.php @@ -42,7 +42,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | ['encrypt'] Whether or not to use an encrypted connection. | | 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE -| 'mysqli' driver accepts an array with the following options: +| 'mysqli' and 'pdo/mysql' drivers accept an array with the following options: | | 'ssl_key' - Path to the private key file | 'ssl_cert' - Path to the public key certificate file -- cgit v1.2.3-24-g4f1b From cfc9e77c89ee5377b25e411ef3d8ab43c8900b7e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 16 Jul 2015 16:17:27 +0300 Subject: Add 'ssl_verify' option for mysqli driver MYSQLI_OPT_SSL_VERIFY_SERVER_CERT is an undocumented option that may not always be available. Reference: http://svn.php.net/viewvc/php/php-src/trunk/ext/mysqli/tests/mysqli_constants.phpt?view=markup&pathrev=302897 --- application/config/database.php | 1 + 1 file changed, 1 insertion(+) (limited to 'application') diff --git a/application/config/database.php b/application/config/database.php index ea345ee79..bf9857fff 100644 --- a/application/config/database.php +++ b/application/config/database.php @@ -49,6 +49,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | 'ssl_ca' - Path to the certificate authority file | 'ssl_capath' - Path to a directory containing trusted CA certificats in PEM format | 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':') +| 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not ('mysqli' only) | | ['compress'] Whether or not to use client compression (MySQL only) | ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections -- cgit v1.2.3-24-g4f1b From 20473fa9612caaa8eba5acbe81110cf1e5b25970 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sat, 18 Jul 2015 10:45:43 +0900 Subject: Fix errors/cli/error_php.php output Signed-off-by: Kenji Suzuki --- application/views/errors/cli/error_php.php | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'application') diff --git a/application/views/errors/cli/error_php.php b/application/views/errors/cli/error_php.php index fec91e54f..ed181a887 100644 --- a/application/views/errors/cli/error_php.php +++ b/application/views/errors/cli/error_php.php @@ -4,22 +4,20 @@ defined('BASEPATH') OR exit('No direct script access allowed'); A PHP Error was encountered -Severity: -Message: -Filename: +Severity: +Message: +Filename: Line Number: Backtrace: - - + + + File: + Line: + Function: + + - File: - Line: - Function: - - - - - \ No newline at end of file + -- cgit v1.2.3-24-g4f1b From 11fdc643f5125ed1e2bb0009e423332c717f707a Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 20 Jul 2015 20:34:39 +0900 Subject: Fix indentation Signed-off-by: Kenji Suzuki --- application/views/errors/cli/error_php.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'application') diff --git a/application/views/errors/cli/error_php.php b/application/views/errors/cli/error_php.php index ed181a887..d977f8464 100644 --- a/application/views/errors/cli/error_php.php +++ b/application/views/errors/cli/error_php.php @@ -12,12 +12,12 @@ Line Number: Backtrace: - - + + File: Line: Function: - - + + -- cgit v1.2.3-24-g4f1b From 58f7cc999223e2094b3990dd7aa349761fd04009 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 20 Jul 2015 14:44:40 +0300 Subject: [ci skip] Apply changes from PR #3983 to error_exception.php --- application/views/errors/cli/error_exception.php | 30 ++++++++++-------------- application/views/errors/cli/error_php.php | 4 +--- 2 files changed, 14 insertions(+), 20 deletions(-) (limited to 'application') diff --git a/application/views/errors/cli/error_exception.php b/application/views/errors/cli/error_exception.php index 75d7f0fad..0203cf467 100644 --- a/application/views/errors/cli/error_exception.php +++ b/application/views/errors/cli/error_exception.php @@ -1,25 +1,21 @@ - + An uncaught Exception was encountered -Type: -Message: -Filename: getFile(); ?> -Line Number: getLine(); ?> +Type: +Message: +Filename: getFile(), "\n"; ?> +Line Number: getLine(), "\n"; ?> Backtrace: - getTrace() as $error): ?> - +getTrace() as $error): ?> + + File: + Line: + Function: + + - File: - Line: - Function: - - - - - \ No newline at end of file + diff --git a/application/views/errors/cli/error_php.php b/application/views/errors/cli/error_php.php index d977f8464..0ea9109fa 100644 --- a/application/views/errors/cli/error_php.php +++ b/application/views/errors/cli/error_php.php @@ -1,6 +1,4 @@ - + A PHP Error was encountered -- cgit v1.2.3-24-g4f1b