From 47a47fb9fafdb26206d01d846d8013f6e883eb37 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 31 May 2014 16:08:30 +0300 Subject: Initial version of new Session library --- application/config/database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/config') diff --git a/application/config/database.php b/application/config/database.php index c8297796b..53620136d 100644 --- a/application/config/database.php +++ b/application/config/database.php @@ -96,7 +96,7 @@ $db['default'] = array( 'database' => '', 'dbdriver' => 'mysqli', 'dbprefix' => '', - 'pconnect' => TRUE, + 'pconnect' => FALSE, 'db_debug' => TRUE, 'cache_on' => FALSE, 'cachedir' => '', -- cgit v1.2.3-24-g4f1b From dfb39bec5faf77e806e55f3ee9d2138e57d55010 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 6 Oct 2014 01:50:14 +0300 Subject: feature/session (#3073): Refactor configuration & fix cookie expiry times --- application/config/config.php | 58 ++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 25 deletions(-) (limited to 'application/config') diff --git a/application/config/config.php b/application/config/config.php index e8d30b625..333e2e988 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -326,33 +326,41 @@ $config['encryption_key'] = ''; | Session Variables |-------------------------------------------------------------------------- | -| 'sess_driver' = the driver to load: cookie (Classic), native (PHP sessions), -| or your custom driver name -| 'sess_valid_drivers' = additional valid drivers which may be loaded -| 'sess_cookie_name' = the name you want for the cookie, must contain only [0-9a-z_-] characters -| 'sess_expiration' = the number of SECONDS you want the session to last. -| by default sessions last 7200 seconds (two hours). Set to zero for no expiration. -| 'sess_expire_on_close' = Whether to cause the session to expire automatically -| when the browser window is closed -| 'sess_encrypt_cookie' = Whether to encrypt the cookie -| 'sess_use_database' = Whether to save the session data to a database -| 'sess_table_name' = The name of the session database table -| 'sess_match_ip' = Whether to match the user's IP address when reading the session data -| 'sess_match_useragent' = Whether to match the User Agent when reading the session data -| 'sess_time_to_update' = how many seconds between CI refreshing Session Information +| 'sess_driver' +| +| The storage driver to use: files, database, redis, memcache +| +| 'sess_cookie_name' +| +| The session cookie name, must contain only [0-9a-z_-] characters +| +| 'sess_expiration' +| +| The number of SECONDS you want the session to last. +| Setting to 0 (zero) means expire when the browser is closed. +| +| 'sess_save_path' +| +| The location to save sessions to, driver dependant. +| +| 'sess_match_ip' +| +| Whether to match the user's IP address when reading the session data. +| +| 'sess_time_to_update' +| +| How many seconds between CI regenerating the session ID. +| +| Other session cookie settings are shared with the rest of the application, +| except for 'cookie_prefix', which is ignored here. | */ -$config['sess_driver'] = 'cookie'; -$config['sess_valid_drivers'] = array(); -$config['sess_cookie_name'] = 'ci_session'; -$config['sess_expiration'] = 7200; -$config['sess_expire_on_close'] = FALSE; -$config['sess_encrypt_cookie'] = FALSE; -$config['sess_use_database'] = FALSE; -$config['sess_table_name'] = 'ci_sessions'; -$config['sess_match_ip'] = FALSE; -$config['sess_match_useragent'] = TRUE; -$config['sess_time_to_update'] = 300; +$config['sess_driver'] = 'files'; +$config['sess_cookie_name'] = 'ci_session'; +$config['sess_expiration'] = 7200; +$config['sess_save_path'] = NULL; +$config['sess_match_ip'] = FALSE; +$config['sess_time_to_update'] = 300; /* |-------------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From a8f29f9ddaeac5cee582a51ce7f255459e1ca711 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 10 Nov 2014 18:55:55 +0200 Subject: #3073 (feature/session): (Try to) fix memcached driver --- application/config/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/config') diff --git a/application/config/config.php b/application/config/config.php index 333e2e988..15785b809 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -328,7 +328,7 @@ $config['encryption_key'] = ''; | | 'sess_driver' | -| The storage driver to use: files, database, redis, memcache +| The storage driver to use: files, database, redis, memcached | | 'sess_cookie_name' | -- cgit v1.2.3-24-g4f1b From 973a6542e0e447c811818969108bdea78d9ca9f7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 19 Jan 2015 13:25:24 +0200 Subject: feature/session (#3073): Update config file and session docs Upgrade instructions are still pending. --- application/config/config.php | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'application/config') diff --git a/application/config/config.php b/application/config/config.php index 204307065..03dc368a2 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -336,11 +336,10 @@ $config['cache_query_string'] = FALSE; | Encryption Key |-------------------------------------------------------------------------- | -| If you use the Encryption class or the Session class you -| MUST set an encryption key. See the user guide for info. +| If you use the Encryption class must set the an encryption key. +| See the user guide for info. | | http://codeigniter.com/user_guide/libraries/encryption.html -| http://codeigniter.com/user_guide/libraries/sessions.html | */ $config['encryption_key'] = ''; @@ -365,7 +364,11 @@ $config['encryption_key'] = ''; | | 'sess_save_path' | -| The location to save sessions to, driver dependant. +| The location to save sessions to, driver dependant +| +| For the 'files' driver, it's a path to a directory. +| For the 'database' driver, it's a table name. +| Please read up the manual for the format with other session drivers. | | 'sess_match_ip' | @@ -376,7 +379,7 @@ $config['encryption_key'] = ''; | How many seconds between CI regenerating the session ID. | | Other session cookie settings are shared with the rest of the application, -| except for 'cookie_prefix', which is ignored here. +| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here. | */ $config['sess_driver'] = 'files'; @@ -391,12 +394,15 @@ $config['sess_time_to_update'] = 300; | Cookie Related Variables |-------------------------------------------------------------------------- | -| 'cookie_prefix' = Set a prefix if you need to avoid collisions -| 'cookie_domain' = Set to .your-domain.com for site-wide cookies -| 'cookie_path' = Typically will be a forward slash -| 'cookie_secure' = Cookies will only be set if a secure HTTPS connection exists. +| 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions +| 'cookie_domain' = Set to .your-domain.com for site-wide cookies +| 'cookie_path' = Typically will be a forward slash +| 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists. | 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript) | +| Note: These settings (with the exception of 'cookie_prefix' and +| 'cookie_httponly') will also affect sessions. +| */ $config['cookie_prefix'] = ''; $config['cookie_domain'] = ''; -- cgit v1.2.3-24-g4f1b From 9e82b0d00cbe83d6cdfa914628023cb98d70c933 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 19 Jan 2015 13:26:46 +0200 Subject: [ci skip] Add missing word in a comment --- application/config/config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'application/config') diff --git a/application/config/config.php b/application/config/config.php index 03dc368a2..d0cfdfaca 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -336,8 +336,8 @@ $config['cache_query_string'] = FALSE; | Encryption Key |-------------------------------------------------------------------------- | -| If you use the Encryption class must set the an encryption key. -| See the user guide for info. +| If you use the Encryption class, you must set the an encryption key. +| See the user guide for more info. | | http://codeigniter.com/user_guide/libraries/encryption.html | -- cgit v1.2.3-24-g4f1b From a7e24ecec7b5c86a6016024510853332680fbe84 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 21 Jan 2015 11:18:32 +0200 Subject: [ci skip] Fix incorrect wording in config.php Related: 9e82b0d00cbe83d6cdfa914628023cb98d70c933 --- application/config/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/config') diff --git a/application/config/config.php b/application/config/config.php index d0cfdfaca..147405555 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -336,7 +336,7 @@ $config['cache_query_string'] = FALSE; | Encryption Key |-------------------------------------------------------------------------- | -| If you use the Encryption class, you must set the an encryption key. +| If you use the Encryption class, you must set an encryption key. | See the user guide for more info. | | http://codeigniter.com/user_guide/libraries/encryption.html -- cgit v1.2.3-24-g4f1b From 4cbe463b4c442e0e2dae2f43565e77f7ac5ecb86 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Wed, 21 Jan 2015 22:56:22 +0100 Subject: Remove closing blocks at end of PHP files --- application/config/autoload.php | 4 ---- application/config/config.php | 4 ---- application/config/constants.php | 3 --- application/config/database.php | 3 --- application/config/doctypes.php | 3 --- application/config/foreign_chars.php | 3 --- application/config/hooks.php | 4 ---- application/config/memcached.php | 3 --- application/config/migration.php | 3 --- application/config/mimes.php | 3 --- application/config/profiler.php | 4 ---- application/config/routes.php | 3 --- application/config/smileys.php | 3 --- application/config/user_agents.php | 3 --- 14 files changed, 46 deletions(-) (limited to 'application/config') diff --git a/application/config/autoload.php b/application/config/autoload.php index b80af5e74..c12ecf6e5 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -174,7 +174,3 @@ $autoload['language'] = array(); */ $autoload['model'] = array(); - - -/* End of file autoload.php */ -/* Location: ./application/config/autoload.php */ \ No newline at end of file diff --git a/application/config/config.php b/application/config/config.php index 147405555..f307c6f6a 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -521,7 +521,3 @@ $config['rewrite_short_tags'] = FALSE; | Array: array('10.0.1.200', '192.168.5.0/24') */ $config['proxy_ips'] = ''; - - -/* End of file config.php */ -/* Location: ./application/config/config.php */ \ No newline at end of file diff --git a/application/config/constants.php b/application/config/constants.php index 33a2f99c3..fba618779 100644 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -120,6 +120,3 @@ define('EXIT_USER_INPUT', 7); // invalid user input define('EXIT_DATABASE', 8); // database error define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code - -/* End of file constants.php */ -/* Location: ./application/config/constants.php */ \ No newline at end of file diff --git a/application/config/database.php b/application/config/database.php index 6264099af..2524f2154 100644 --- a/application/config/database.php +++ b/application/config/database.php @@ -121,6 +121,3 @@ $db['default'] = array( 'failover' => array(), 'save_queries' => TRUE ); - -/* End of file database.php */ -/* Location: ./application/config/database.php */ \ No newline at end of file diff --git a/application/config/doctypes.php b/application/config/doctypes.php index 32df5f1ea..29cc533fa 100644 --- a/application/config/doctypes.php +++ b/application/config/doctypes.php @@ -58,6 +58,3 @@ $_doctypes = array( 'xhtml-rdfa-1' => '', 'xhtml-rdfa-2' => '' ); - -/* End of file doctypes.php */ -/* Location: ./application/config/doctypes.php */ \ No newline at end of file diff --git a/application/config/foreign_chars.php b/application/config/foreign_chars.php index ea6afc527..038816f02 100644 --- a/application/config/foreign_chars.php +++ b/application/config/foreign_chars.php @@ -136,6 +136,3 @@ $foreign_characters = array( '/Я/' => 'Ya', '/я/' => 'ya' ); - -/* End of file foreign_chars.php */ -/* Location: ./application/config/foreign_chars.php */ \ No newline at end of file diff --git a/application/config/hooks.php b/application/config/hooks.php index d6b47e534..db155326c 100644 --- a/application/config/hooks.php +++ b/application/config/hooks.php @@ -47,7 +47,3 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | http://codeigniter.com/user_guide/general/hooks.html | */ - - -/* End of file hooks.php */ -/* Location: ./application/config/hooks.php */ \ No newline at end of file diff --git a/application/config/memcached.php b/application/config/memcached.php index b35730d34..9374f67b4 100644 --- a/application/config/memcached.php +++ b/application/config/memcached.php @@ -53,6 +53,3 @@ $config = array( 'weight' => '1', ), ); - -/* End of file memcached.php */ -/* Location: ./application/config/memcached.php */ \ No newline at end of file diff --git a/application/config/migration.php b/application/config/migration.php index 6eb55c35b..abdcf2195 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -118,6 +118,3 @@ $config['migration_version'] = 0; | */ $config['migration_path'] = APPPATH.'migrations/'; - -/* End of file migration.php */ -/* Location: ./application/config/migration.php */ \ No newline at end of file diff --git a/application/config/mimes.php b/application/config/mimes.php index 09a2f8c66..2a3e39130 100644 --- a/application/config/mimes.php +++ b/application/config/mimes.php @@ -190,6 +190,3 @@ return array( 'svg' => array('image/svg+xml', 'application/xml', 'text/xml'), 'vcf' => 'text/x-vcard' ); - -/* End of file mimes.php */ -/* Location: ./application/config/mimes.php */ \ No newline at end of file diff --git a/application/config/profiler.php b/application/config/profiler.php index edba30cad..4733dbb94 100644 --- a/application/config/profiler.php +++ b/application/config/profiler.php @@ -48,7 +48,3 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | http://codeigniter.com/user_guide/general/profiling.html | */ - - -/* End of file profiler.php */ -/* Location: ./application/config/profiler.php */ \ No newline at end of file diff --git a/application/config/routes.php b/application/config/routes.php index b5fd8a0d2..6b2bf71a9 100644 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -88,6 +88,3 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $route['default_controller'] = 'welcome'; $route['404_override'] = ''; $route['translate_uri_dashes'] = FALSE; - -/* End of file routes.php */ -/* Location: ./application/config/routes.php */ \ No newline at end of file diff --git a/application/config/smileys.php b/application/config/smileys.php index 3a57f26f0..bfccc3c06 100644 --- a/application/config/smileys.php +++ b/application/config/smileys.php @@ -99,6 +99,3 @@ $smileys = array( ':question:' => array('question.gif', '19', '19', 'question') ); - -/* End of file smileys.php */ -/* Location: ./application/config/smileys.php */ \ No newline at end of file diff --git a/application/config/user_agents.php b/application/config/user_agents.php index 5199f0488..7f03ef8a4 100644 --- a/application/config/user_agents.php +++ b/application/config/user_agents.php @@ -244,6 +244,3 @@ $robots = array( 'feedfetcher-google' => 'Feedfetcher Google', 'curious george' => 'Curious George' ); - -/* End of file user_agents.php */ -/* Location: ./application/config/user_agents.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From b56de6537e9d9a6156dbeaa325f52d3b6e3792a4 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Thu, 22 Jan 2015 21:27:38 +0100 Subject: Remove license blocks in /application files These blocks are annoying for the user and serve little to no purpose as the files are just config files, a boilerplate controller and some views. --- application/config/autoload.php | 36 ------------------------------------ application/config/config.php | 36 ------------------------------------ application/config/constants.php | 36 ------------------------------------ application/config/database.php | 36 ------------------------------------ application/config/doctypes.php | 36 ------------------------------------ application/config/foreign_chars.php | 36 ------------------------------------ application/config/hooks.php | 36 ------------------------------------ application/config/memcached.php | 36 ------------------------------------ application/config/migration.php | 36 ------------------------------------ application/config/mimes.php | 36 ------------------------------------ application/config/profiler.php | 36 ------------------------------------ application/config/routes.php | 36 ------------------------------------ application/config/smileys.php | 36 ------------------------------------ application/config/user_agents.php | 36 ------------------------------------ 14 files changed, 504 deletions(-) (limited to 'application/config') diff --git a/application/config/autoload.php b/application/config/autoload.php index c12ecf6e5..f11117af7 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -1,40 +1,4 @@ Date: Mon, 26 Jan 2015 23:35:50 +0200 Subject: [ci skip] Remove 'session' from autoload comments for 'driver' ... cause it doesn't work that way. --- application/config/autoload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'application/config') diff --git a/application/config/autoload.php b/application/config/autoload.php index f11117af7..72f855c8b 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -52,7 +52,7 @@ $autoload['packages'] = array(); | | Prototype: | -| $autoload['libraries'] = array('database', 'email', 'xmlrpc'); +| $autoload['libraries'] = array('database', 'email', 'session'); | | You can also supply an alternative library name to be assigned | in the controller: @@ -73,7 +73,7 @@ $autoload['libraries'] = array(); | | Prototype: | -| $autoload['drivers'] = array('session', 'cache'); +| $autoload['drivers'] = array('cache'); */ $autoload['drivers'] = array(); -- cgit v1.2.3-24-g4f1b From 1bd697cd7fcfd99ff292f26e697bb192901e1a41 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 2 Feb 2015 14:07:57 +0200 Subject: [ci skip] Improve note about sess_save_path in config.php --- application/config/config.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'application/config') diff --git a/application/config/config.php b/application/config/config.php index 7640df479..1e399590b 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -328,12 +328,14 @@ $config['encryption_key'] = ''; | | 'sess_save_path' | -| The location to save sessions to, driver dependant +| The location to save sessions to, driver dependant. | -| For the 'files' driver, it's a path to a directory. +| For the 'files' driver, it's a path to a writable directory. | For the 'database' driver, it's a table name. | Please read up the manual for the format with other session drivers. | +| IMPORTANT: You are REQUIRED to set a valid save path! +| | 'sess_match_ip' | | Whether to match the user's IP address when reading the session data. -- cgit v1.2.3-24-g4f1b