diff options
Diffstat (limited to 'application/config')
-rw-r--r-- | application/config/.gitignore | 3 | ||||
-rw-r--r-- | application/config/autoload.php | 4 | ||||
-rw-r--r-- | application/config/config.php | 92 | ||||
-rw-r--r-- | application/config/constants.php | 2 | ||||
-rw-r--r-- | application/config/example/.gitignore | 1 | ||||
-rw-r--r-- | application/config/example/config-local.php | 16 | ||||
-rw-r--r-- | application/config/example/database.php (renamed from application/config/database.php) | 18 | ||||
-rw-r--r-- | application/config/example/index.html | 10 | ||||
-rw-r--r-- | application/config/example/memcached.php | 17 | ||||
-rw-r--r-- | application/config/migration.php | 6 | ||||
-rw-r--r-- | application/config/routes.php | 6 |
11 files changed, 158 insertions, 17 deletions
diff --git a/application/config/.gitignore b/application/config/.gitignore new file mode 100644 index 000000000..45e1c5158 --- /dev/null +++ b/application/config/.gitignore @@ -0,0 +1,3 @@ +config-local.php +database.php +memcached.php diff --git a/application/config/autoload.php b/application/config/autoload.php index 53129c9c6..a471f3ab2 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -52,7 +52,7 @@ $autoload['packages'] = array(); | $autoload['libraries'] = array('database', 'session', 'xmlrpc'); */ -$autoload['libraries'] = array(); +$autoload['libraries'] = array('database'); /* @@ -64,7 +64,7 @@ $autoload['libraries'] = array(); | $autoload['helper'] = array('url', 'file'); */ -$autoload['helper'] = array(); +$autoload['helper'] = array('url'); /* diff --git a/application/config/config.php b/application/config/config.php index 1ec65435e..d386a77b8 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -248,7 +248,7 @@ $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_use_database'] = true; $config['sess_table_name'] = 'ci_sessions'; $config['sess_match_ip'] = FALSE; $config['sess_match_useragent'] = TRUE; @@ -293,7 +293,7 @@ $config['global_xss_filtering'] = FALSE; | 'csrf_cookie_name' = The cookie name | 'csrf_expire' = The number in seconds the token should expire. */ -$config['csrf_protection'] = FALSE; +$config['csrf_protection'] = FALSE; // our controller enables this later $config['csrf_token_name'] = 'csrf_test_name'; $config['csrf_cookie_name'] = 'csrf_cookie_name'; $config['csrf_expire'] = 7200; @@ -357,6 +357,94 @@ $config['rewrite_short_tags'] = FALSE; */ $config['proxy_ips'] = ''; +/* +|-------------------------------------------------------------------------- +| FileBin +|-------------------------------------------------------------------------- + */ + +// upload_path should NOT be readable/served by the server, but only by the script +$config['upload_path'] = FCPATH.'data/uploads'; + +// Make sure to adjust PHP's limits (post_max_size, upload_max_filesize) if necessary +$config['upload_max_size'] = 256*1024*1024; // 256MiB + +// Files smaller than this will be highlit, larger ones will simply be downloaded +// even if requested to be highlit. +$config['upload_max_text_size'] = 2*1024*1024; // 2MiB + +// Files older than this will be deleted by the cron job. +// 0 disables deletion. +$config['upload_max_age'] = 60*60*24*5; // 5 days +$config['actions_max_age'] = 60*60*24*5; // 5 days + +// Files smaller than this won't be deleted (even if they are old enough) +$config['small_upload_size'] = 1024*10; // 10KiB + + +// Possible values: +// - apc: needs the apc module and is only useful on long running php processes +// - file: you will have to clean up the cache directory yourself (./application/cache/) +// - memcached: config in application/config/memcached.php; you need the memcached module (with the D) +// - dummy: disables caching +// +// It is highly suggested to enable the cache. +$config['cache_backend'] = "dummy"; + + +// For possible drivers look into ./application/libraries/Duser/drivers/ +$config['authentication_driver'] = 'db'; + +// This is only used it the driver is set to ldap +if (extension_loaded("ldap")) { + $config['auth_ldap'] = array( + "host" => 'ldaps://ldap.example.com', + "port" => 636, + "basedn" => "dc=example,dc=com", + "scope" => "one", // possible values: base, one, subtree + "options" => array( + // key/values pairs for ldap_set_option + // http://php.net/manual/en/function.ldap-set-option.php + LDAP_OPT_PROTOCOL_VERSION => 3 + ), + // Please note that php-ldap converts attributes to lowercase + "userid_field" => "uidnumber", // This has to be a unique integer + "username_field" => "uid" // This is the value the user supplies on the login form + ); +} + +// This is only used it the driver is set to fluxbb +$config['auth_fluxbb'] = array( + 'database' => 'fluxbb' +); + + +// Possible values: production, development +// "development" enables features like profiling and display of SQL queries. +$config['environment'] = "production"; + + +// This sets the download implementation. Possible values are php, nginx and lighttpd. +// The nginx and lighttpd drivers make use of the server's sendfile feature. +// +// The lighttpd driver requires the following directive to be set in your fastcgi.server configuration: +// "allow-x-send-file" => "enable" +// See http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModFastCGI#X-Sendfile +// +// When using the nginx download driver you need to define an internal location +// from which nginx will serve your uploads: +// location ^~ /protected-uploads/ { +// internal; +// alias <upload_path>/; +// } +// See http://wiki.nginx.org/X-accel +$config['download_driver'] = 'php'; + +$config['download_nginx_location'] = '/protected-uploads'; + +if (file_exists(FCPATH.'application/config/config-local.php')) { + include FCPATH.'application/config/config-local.php'; +} /* End of file config.php */ /* Location: ./application/config/config.php */ diff --git a/application/config/constants.php b/application/config/constants.php index 4a879d360..1185dbca0 100644 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -1,5 +1,7 @@ <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); +putenv('HOME='.FCPATH); + /* |-------------------------------------------------------------------------- | File and Directory Modes diff --git a/application/config/example/.gitignore b/application/config/example/.gitignore new file mode 100644 index 000000000..f9be8dfe0 --- /dev/null +++ b/application/config/example/.gitignore @@ -0,0 +1 @@ +!* diff --git a/application/config/example/config-local.php b/application/config/example/config-local.php new file mode 100644 index 000000000..941c8b119 --- /dev/null +++ b/application/config/example/config-local.php @@ -0,0 +1,16 @@ +<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); + +/* + * Use this file to override any settings from config.php + * + * For descriptions of the options please refer to config.php. + */ + +// set this to a 32char random string +$config['encryption_key'] = ''; + +$config['upload_path'] = FCPATH.'data/uploads'; + +$config['index_page'] = 'index.php'; + +$config['cache_backend'] = "dummy"; diff --git a/application/config/database.php b/application/config/example/database.php index b4b34bf66..51b666b38 100644 --- a/application/config/database.php +++ b/application/config/example/database.php @@ -48,18 +48,18 @@ $active_group = 'default'; $active_record = TRUE; -$db['default']['hostname'] = 'localhost'; -$db['default']['username'] = ''; -$db['default']['password'] = ''; -$db['default']['database'] = ''; -$db['default']['dbdriver'] = 'mysql'; -$db['default']['dbprefix'] = ''; +$db['default']['hostname'] = "localhost"; +$db['default']['username'] = ""; +$db['default']['password'] = ""; +$db['default']['database'] = ""; +$db['default']['dbdriver'] = "mysqli"; +$db['default']['dbprefix'] = ""; $db['default']['pconnect'] = TRUE; $db['default']['db_debug'] = TRUE; $db['default']['cache_on'] = FALSE; -$db['default']['cachedir'] = ''; -$db['default']['char_set'] = 'utf8'; -$db['default']['dbcollat'] = 'utf8_general_ci'; +$db['default']['cachedir'] = ""; +$db['default']['char_set'] = "utf8"; +$db['default']['dbcollat'] = "utf8_bin"; $db['default']['swap_pre'] = ''; $db['default']['autoinit'] = TRUE; $db['default']['stricton'] = FALSE; diff --git a/application/config/example/index.html b/application/config/example/index.html new file mode 100644 index 000000000..c942a79ce --- /dev/null +++ b/application/config/example/index.html @@ -0,0 +1,10 @@ +<html> +<head> + <title>403 Forbidden</title> +</head> +<body> + +<p>Directory access is forbidden.</p> + +</body> +</html>
\ No newline at end of file diff --git a/application/config/example/memcached.php b/application/config/example/memcached.php new file mode 100644 index 000000000..29b145ec8 --- /dev/null +++ b/application/config/example/memcached.php @@ -0,0 +1,17 @@ +<?php + +$config = array( + "default" => array( + "hostname" => "127.0.0.1", + "port" => 11211, + "weight" => 1, + ), + "socket" => array( + "hostname" => FCPATH.'/memcached.sock', + "port" => 0, + "weight" => 2, + ), +); + + +?> diff --git a/application/config/migration.php b/application/config/migration.php index df42a3cae..75e9bc19b 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -8,7 +8,7 @@ | whenever you intend to do a schema migration. | */ -$config['migration_enabled'] = FALSE; +$config['migration_enabled'] = true; /* @@ -21,7 +21,7 @@ $config['migration_enabled'] = FALSE; | be upgraded / downgraded to. | */ -$config['migration_version'] = 0; +$config['migration_version'] = 13; /* @@ -38,4 +38,4 @@ $config['migration_path'] = APPPATH . 'migrations/'; /* End of file migration.php */ -/* Location: ./application/config/migration.php */
\ No newline at end of file +/* Location: ./application/config/migration.php */ diff --git a/application/config/routes.php b/application/config/routes.php index 5f9a58343..e0d963405 100644 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -38,7 +38,11 @@ | */ -$route['default_controller'] = "welcome"; +$route['default_controller'] = "file"; +$route['user/(:any)'] = "user/$1"; +$route['file/(:any)'] = "file/$1"; +$route['tools/(:any)'] = "tools/$1"; +$route['(:any)'] = "file/index/$1"; $route['404_override'] = ''; |