CakePHP Kernel with variables

Source: Internet
Author: User
Tags php session
CakePHP Kernel configuration variables

Configuration classes are typically used to set up CakePHP's core configuration variables, which are in the app/config/core.php file. The following are descriptions of these variables and their impact on cakephp.

Variable name Description debug app.baseurl cache.check session.save security.level
set debug output mode for cakephp

0 = no output result
1 = error message and warning displayed
2 = error message, warning and database query statement
3 = Display error message, warning and database query statement, complete controller dump?
Do not comment out this definition if you do not intend to use Apache's mod_rewrite. Also do not forget to delete the. htaccess file
Routing.admin Do not comment out this variable if you want to use CakePHP's routing (admin route), the value of the variable is the same as the name of the route, and more will be introduced next.
Cache.disable When set to True, the entire site's cache is closed.
If set to True, the view cache is turned on. Although the controller cache needs to be turned on separately, this variable can monitor these settings.
cakephp the session storage mechanism?

php = Use the default PHP session store
Cake = Save session data to the/APP/TMP directory
Database = Save session to database table. But make sure to set the table using the/app/config/sql/sessions.sql database query file.
Session.table The table name that stores the session, not including the prefix
Session.database Store the database name of the session
Session.cookie The name of the cookie that tracks the session
Session.Timeout Time of the session timeout, in seconds, with the actual value Security.level as the benchmark
Session.start If True,sessions is turned on automatically
Session.checkagent If the user for false,session does not check the individual requests between the changes
cakephp security level. The value of the security level determines the value of the session.timeout?

Valid values:
' high ' = x ten
' Medium ' = x +
' low ' = x +

If set to: ' High ' or ' medium ', it will start session.ref Erer_check?

If ' security.level ' is set to ' high ' then cakephp's session ID will be regenerated in each request.
Security.salt A random string is used in the secure hash method.
Acl.classname, Acl.database constants, which are used in the CakePHP access control list functionality. For more information, please refer to the Access Control List section

Please note:There is also a cache configuration in the core.php file, which we will explain later

The configuration class can modify the kernel configuration immediately, which is quite handy, especially when debugging a small piece of logic

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.