core.php

Go to the documentation of this file.
00001 <?php
00002 /* SVN FILE: $Id: cake_2console_2libs_2templates_2skel_2config_2core_8php-source.html 580 2008-07-01 14:45:49Z gwoo $ */
00003 /**
00004  * This is core configuration file.
00005  *
00006  * Use it to configure core behavior of Cake.
00007  *
00008  * PHP versions 4 and 5
00009  *
00010  * CakePHP(tm) :  Rapid Development Framework <http://www.cakephp.org/>
00011  * Copyright 2005-2008, Cake Software Foundation, Inc.
00012  *                              1785 E. Sahara Avenue, Suite 490-204
00013  *                              Las Vegas, Nevada 89104
00014  *
00015  * Licensed under The MIT License
00016  * Redistributions of files must retain the above copyright notice.
00017  *
00018  * @filesource
00019  * @copyright       Copyright 2005-2008, Cake Software Foundation, Inc.
00020  * @link                http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
00021  * @package         cake
00022  * @subpackage      cake.app.config
00023  * @since           CakePHP(tm) v 0.2.9
00024  * @version         $Revision: 580 $
00025  * @modifiedby      $LastChangedBy: gwoo $
00026  * @lastmodified    $Date: 2008-07-01 09:45:49 -0500 (Tue, 01 Jul 2008) $
00027  * @license         http://www.opensource.org/licenses/mit-license.php The MIT License
00028  */
00029 /**
00030  * CakePHP Debug Level:
00031  *
00032  * Production Mode:
00033  *  0: No error messages, errors, or warnings shown. Flash messages redirect.
00034  *
00035  * Development Mode:
00036  *  1: Errors and warnings shown, model caches refreshed, flash messages halted.
00037  *  2: As in 1, but also with full debug messages and SQL output.
00038  *  3: As in 2, but also with full controller dump.
00039  *
00040  * In production mode, flash messages redirect after a time interval.
00041  * In development mode, you need to click the flash message to continue.
00042  */
00043     Configure::write('debug', 2);
00044 /**
00045  * Application wide charset encoding
00046  */
00047     Configure::write('App.encoding', 'UTF-8');
00048 /**
00049  * To configure CakePHP *not* to use mod_rewrite and to
00050  * use CakePHP pretty URLs, remove these .htaccess
00051  * files:
00052  *
00053  * /.htaccess
00054  * /app/.htaccess
00055  * /app/webroot/.htaccess
00056  *
00057  * And uncomment the App.baseUrl below:
00058  */
00059     //Configure::write('App.baseUrl', env('SCRIPT_NAME'));
00060 /**
00061  * Uncomment the define below to use CakePHP admin routes.
00062  *
00063  * The value of the define determines the name of the route
00064  * and its associated controller actions:
00065  *
00066  * 'admin'      -> admin_index() and /admin/controller/index
00067  * 'superuser' -> superuser_index() and /superuser/controller/index
00068  */
00069     //Configure::write('Routing.admin', 'admin');
00070 
00071 /**
00072  * Turn off all caching application-wide.
00073  *
00074  */
00075     //Configure::write('Cache.disable', true);
00076 /**
00077  * Enable cache checking.
00078  *
00079  * If set to true, for view caching you must still use the controller
00080  * var $cacheAction inside your controllers to define caching settings.
00081  * You can either set it controller-wide by setting var $cacheAction = true,
00082  * or in each action using $this->cacheAction = true.
00083  *
00084  */
00085     //Configure::write('Cache.check', true);
00086 /**
00087  * Defines the default error type when using the log() function. Used for
00088  * differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
00089  */
00090     define('LOG_ERROR', 2);
00091 /**
00092  * The preferred session handling method. Valid values:
00093  *
00094  * 'php'            Uses settings defined in your php.ini.
00095  * 'cake'       Saves session files in CakePHP's /tmp directory.
00096  * 'database'   Uses CakePHP's database sessions.
00097  *
00098  * To define a custom session handler, save it at /app/config/<name>.php.
00099  * Set the value of 'Session.save' to <name> to utilize it in CakePHP.
00100  *
00101  * To use database sessions, execute the SQL file found at /app/config/sql/sessions.sql.
00102  *
00103  */
00104     Configure::write('Session.save', 'php');
00105 /**
00106  * The name of the table used to store CakePHP database sessions.
00107  *
00108  * 'Session.save' must be set to 'database' in order to utilize this constant.
00109  *
00110  * The table name set here should *not* include any table prefix defined elsewhere.
00111  */
00112     //Configure::write('Session.table', 'cake_sessions');
00113 /**
00114  * The DATABASE_CONFIG::$var to use for database session handling.
00115  *
00116  * 'Session.save' must be set to 'database' in order to utilize this constant.
00117  */
00118     //Configure::write('Session.database', 'default');
00119 /**
00120  * The name of CakePHP's session cookie.
00121  */
00122     Configure::write('Session.cookie', 'CAKEPHP');
00123 /**
00124  * Session time out time (in seconds).
00125  * Actual value depends on 'Security.level' setting.
00126  */
00127     Configure::write('Session.timeout', '120');
00128 /**
00129  * If set to false, sessions are not automatically started.
00130  */
00131     Configure::write('Session.start', true);
00132 /**
00133  * When set to false, HTTP_USER_AGENT will not be checked
00134  * in the session
00135  */
00136     Configure::write('Session.checkAgent', true);
00137 /**
00138  * The level of CakePHP security. The session timeout time defined
00139  * in 'Session.timeout' is multiplied according to the settings here.
00140  * Valid values:
00141  *
00142  * 'high'   Session timeout in 'Session.timeout' x 10
00143  * 'medium' Session timeout in 'Session.timeout' x 100
00144  * 'low'        Session timeout in 'Session.timeout' x 300
00145  *
00146  * CakePHP session IDs are also regenerated between requests if
00147  * 'Security.level' is set to 'high'.
00148  */
00149     Configure::write('Security.level', 'high');
00150 /**
00151  * A random string used in security hashing methods.
00152  */
00153     Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
00154 /**
00155  * Compress CSS output by removing comments, whitespace, repeating tags, etc.
00156  * This requires a/var/cache directory to be writable by the web server for caching.
00157  * and /vendors/csspp/csspp.php
00158  *
00159  * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
00160  */
00161     //Configure::write('Asset.filter.css', 'css.php');
00162 /**
00163  * Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
00164  * output, and setting the config below to the name of the script.
00165  *
00166  * To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link().
00167  */
00168     //Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
00169 /**
00170  * The classname and database used in CakePHP's
00171  * access control lists.
00172  */
00173     Configure::write('Acl.classname', 'DbAcl');
00174     Configure::write('Acl.database', 'default');
00175 /**
00176  *
00177  * Cache Engine Configuration
00178  * Default settings provided below
00179  *
00180  * File storage engine.
00181  *
00182  *   Cache::config('default', array(
00183  *      'engine' => 'File', //[required]
00184  *      'duration'=> 3600, //[optional]
00185  *      'probability'=> 100, //[optional]
00186  *      'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
00187  *      'prefix' => 'cake_', //[optional]  prefix every cache file with this string
00188  *      'lock' => false, //[optional]  use file locking
00189  *      'serialize' => true, [optional]
00190  *  ));
00191  *
00192  *
00193  * APC (http://pecl.php.net/package/APC)
00194  *
00195  *   Cache::config('default', array(
00196  *      'engine' => 'Apc', //[required]
00197  *      'duration'=> 3600, //[optional]
00198  *      'probability'=> 100, //[optional]
00199  *      'prefix' => Inflector::slug(APP_DIR) . '_', //[optional]  prefix every cache file with this string
00200  *  ));
00201  *
00202  * Xcache (http://xcache.lighttpd.net/)
00203  *
00204  *   Cache::config('default', array(
00205  *      'engine' => 'Xcache', //[required]
00206  *      'duration'=> 3600, //[optional]
00207  *      'probability'=> 100, //[optional]
00208  *      'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
00209  *      'user' => 'user', //user from xcache.admin.user settings
00210  *      'password' => 'password', //plaintext password (xcache.admin.pass)
00211  *  ));
00212  *
00213  *
00214  * Memcache (http://www.danga.com/memcached/)
00215  *
00216  *   Cache::config('default', array(
00217  *      'engine' => 'Memcache', //[required]
00218  *      'duration'=> 3600, //[optional]
00219  *      'probability'=> 100, //[optional]
00220  *      'prefix' => Inflector::slug(APP_DIR) . '_', //[optional]  prefix every cache file with this string
00221  *      'servers' => array(
00222  *          '127.0.0.1:11211' // localhost, default port 11211
00223  *      ), //[optional]
00224  *      'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
00225  *  ));
00226  *
00227  */
00228     Cache::config('default', array('engine' => 'File'));
00229 ?>