Variables in the CakePHP kernel

Source: Internet
Author: User
The CakePHP kernel configuration variable configuration class is usually used to set the core configuration variables of CakePHP, which are in the app/config/core. php file. The following describes the variables and their impact on CakePHP. Variable name description debug set CakePHP debug output mode 0 = no output result 1 = CakePHP kernel configuration variable

The configuration class is usually used to set the core configuration variables of CakePHP, which are in the app/config/core. php file. The following describes the variables and their impact on CakePHP.

Variable name description
Debug Set the output mode for CakePHP debugging

0 = no output results
1 = Display error messages and warnings
2 = Display error messages, warnings, and database query statements
3 = displays error messages, warnings, and database query statements to complete the controller dump?
App. baseUrl Do not comment out this definition if youNot intendedUse Apache mod_rewrite. do not forget to delete the. htaccess file.
Routing. admin Do not comment out this variable. if you want to use the CakePHP route (admin route) and the variable value is the same as the route name, we will introduce more.
Cache. disable If it is set to true, the cache of the entire website will be disabled.
Cache. check If this parameter is set to true, view cache is enabled. Although the controller cache needs to be enabled separately, this variable can monitor these settings.
Session. save What is the session storage mechanism of CakePHP?

Php = use the default PHP session storage
Cake = Save session data to the/app/tmp Directory
Database = Save the session to the database table. However, you must use the/app/config/SQL/sessions. SQL database query file to set the table.
Session. table Name of the table storing the session, excluding the prefix
Session. database Name of the database storing the session
Session. cookie Name of the cookie that tracks the session
Session. timeout Session Timeout time, in seconds. the actual value is based on Security. level.
Session. start If this parameter is set to true, sessions is enabled automatically.
Session. checkAgent If this parameter is set to false, the session does not check whether the user of each request has not changed.
Security. level CakePHP security level. The value of the security level determines the value of Session. timeout?

Valid values:
'High' = x 10
'Medium '= x 100
'Low' = x 300

If it is set to 'high' or 'Medium ', the session. referer_check?

If 'security. level' is set to 'high', the session ID of CakePHP is regenerated in each request.
Security. salt A random string is used in the security hash method.
Acl. classname, Acl. database Constant, used in the CakePHP access control list function. For more information, see the access control list section.

Note:Cache configuration is also available in the core. php file. we will explain it later.

The configuration class can instantly modify the kernel configuration, which is quite convenient, especially when debugging a small segment of logic.

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.