updating configure and core.php. fixes a no mod_rewrite issue.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5764 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2007-10-15 21:56:31 +00:00
parent 8f91654b07
commit a921492b5a
3 changed files with 71 additions and 80 deletions

View file

@ -26,18 +26,6 @@
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
/**
* To configure CakePHP *not* to use mod_rewrite and to
* use CakePHP pretty URLs, remove these .htaccess
* files:
*
* /.htaccess
* /app/.htaccess
* /app/webroot/.htaccess
*
* And uncomment the baseUrl below:
*/
//Configure::write('baseUrl', env('SCRIPT_NAME'));
/**
* CakePHP Debug Level:
*
@ -53,21 +41,44 @@
* In development mode, you need to click the flash message to continue.
*/
Configure::write('debug', 2);
/**
* To configure CakePHP *not* to use mod_rewrite and to
* use CakePHP pretty URLs, remove these .htaccess
* files:
*
* /.htaccess
* /app/.htaccess
* /app/webroot/.htaccess
*
* And uncomment the App.baseUrl below:
*/
//Configure::write('App.baseUrl', env('SCRIPT_NAME'));
/**
* Uncomment the define below to use CakePHP admin routes.
*
* The value of the define determines the name of the route
* and its associated controller actions:
*
* 'admin' -> admin_index() and /admin/controller/index
* 'superuser' -> superuser_index() and /superuser/controller/index
*/
//Configure::write('Routing.admin', 'admin');
/**
* Turn off caching application-wide.
* Turn off all caching application-wide.
*
*/
Configure::write('Cache.disable', false);
//Configure::write('Cache.disable', true);
/**
* Turn off or enable cache checking application-wide.
* Enable cache checking.
*
* If set to true, for view caching you must still use the controller
* var $cacheAction inside your controllers to define caching settings.
* You can either set it controller-wide by setting var $cacheAction = true,
* or in each action using $this->cacheAction = true.
*
* If set to true, you must still use the controller var $cacheAction inside
* your controllers to define caching settings. You can either set it
* controller-wide by setting var $cacheAction = true, or in each action
* using $this->cacheAction = true.
*/
Configure::write('Cache.check', false);
//Configure::write('Cache.check', true);
/**
* Defines the default error type when using the log() function. Used for
* differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
@ -121,23 +132,6 @@
* Actual value depends on CAKE_SECURITY setting.
*/
define('CAKE_SESSION_TIMEOUT', '120');
/**
* Uncomment the define below to use CakePHP admin routes.
*
* The value of the define determines the name of the route
* and its associated controller actions:
*
* 'admin' -> admin_index() and /admin/controller/index
* 'superuser' -> superuser_index() and /superuser/controller/index
*/
// Configure::write('Routing.admin', 'admin');
/**
* Enable or disable CakePHP webservices routing. Set to 'off' or 'on'.
*
* @deprecated
* @see Router::parseExtensions()
*/
Configure::write('Routing.webservices', 'off');
/**
* Compress CSS output by removing comments, whitespace, repeating tags, etc.
* This requires a/var/cache directory to be writable by the web server for caching.
@ -213,4 +207,5 @@
* );
*/
Cache::config('default', array('engine' => 'File'));
?>

View file

@ -26,18 +26,6 @@
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
/**
* To configure CakePHP *not* to use mod_rewrite and to
* use CakePHP pretty URLs, remove these .htaccess
* files:
*
* /.htaccess
* /app/.htaccess
* /app/webroot/.htaccess
*
* And uncomment the baseUrl below:
*/
//Configure::write('baseUrl', env('SCRIPT_NAME'));
/**
* CakePHP Debug Level:
*
@ -54,19 +42,43 @@
*/
Configure::write('debug', 2);
/**
* Turn off caching application-wide.
* To configure CakePHP *not* to use mod_rewrite and to
* use CakePHP pretty URLs, remove these .htaccess
* files:
*
* /.htaccess
* /app/.htaccess
* /app/webroot/.htaccess
*
* And uncomment the App.baseUrl below:
*/
Configure::write('Cache.disable', false);
//Configure::write('App.baseUrl', env('SCRIPT_NAME'));
/**
* Turn off or enable cache checking application-wide.
* Uncomment the define below to use CakePHP admin routes.
*
* If set to true, you must still use the controller var $cacheAction inside
* your controllers to define caching settings. You can either set it
* controller-wide by setting var $cacheAction = true, or in each action
* using $this->cacheAction = true.
* The value of the define determines the name of the route
* and its associated controller actions:
*
* 'admin' -> admin_index() and /admin/controller/index
* 'superuser' -> superuser_index() and /superuser/controller/index
*/
Configure::write('Cache.check', false);
//Configure::write('Routing.admin', 'admin');
/**
* Turn off all caching application-wide.
*
*/
//Configure::write('Cache.disable', true);
/**
* Enable cache checking.
*
* If set to true, for view caching you must still use the controller
* var $cacheAction inside your controllers to define caching settings.
* You can either set it controller-wide by setting var $cacheAction = true,
* or in each action using $this->cacheAction = true.
*
*/
//Configure::write('Cache.check', true);
/**
* Defines the default error type when using the log() function. Used for
* differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
@ -120,23 +132,6 @@
* Actual value depends on CAKE_SECURITY setting.
*/
define('CAKE_SESSION_TIMEOUT', '120');
/**
* Uncomment the define below to use CakePHP admin routes.
*
* The value of the define determines the name of the route
* and its associated controller actions:
*
* 'admin' -> admin_index() and /admin/controller/index
* 'superuser' -> superuser_index() and /superuser/controller/index
*/
// Configure::write('Routing.admin', 'admin');
/**
* Enable or disable CakePHP webservices routing. Set to 'off' or 'on'.
*
* @deprecated
* @see Router::parseExtensions()
*/
Configure::write('Routing.webservices', 'off');
/**
* Compress CSS output by removing comments, whitespace, repeating tags, etc.
* This requires a/var/cache directory to be writable by the web server for caching.

View file

@ -531,10 +531,13 @@ class Configure extends Object {
$componentPaths = null;
$behaviorPaths = null;
$pluginPaths = null;
if ($boot) {
$_this->write('App', array('base' => false, 'baseUrl' => false, 'dir' => APP_DIR, 'webroot' => WEBROOT_DIR));
if (!include(APP_PATH . 'config' . DS . 'core.php')) {
trigger_error(sprintf(__("Can't find application core file. Please create %score.php, and make sure it is readable by PHP.", true), CONFIGS), E_USER_ERROR);
}
if (!include(APP_PATH . 'config' . DS . 'bootstrap.php')) {
trigger_error(sprintf(__("Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP.", true), CONFIGS), E_USER_ERROR);
}
@ -548,14 +551,12 @@ class Configure extends Object {
$_this->__buildBehaviorPaths($behaviorPaths);
$_this->__buildPluginPaths($pluginPaths);
$baseUrl = false;
if (defined('BASE_URL')) {
$baseUrl = BASE_URL;
trigger_error('BASE_URL Deprecated: See Configure::write(\'App.baseUrl\', \'' . BASE_URL . '\'); in APP/config/core.php', E_USER_WARNING);
$_this->write('App.baseUrl', BASE_URL);
}
$_this->write('App', array('base' => false, 'baseUrl' => $baseUrl, 'dir' => APP_DIR, 'webroot' => WEBROOT_DIR));
if (defined('DEBUG')) {
trigger_error('Deprecated: Use Configure::write(\'debug\', ' . DEBUG . '); in APP/config/core.php', E_USER_WARNING);
trigger_error('DEBUG Deprecated: Use Configure::write(\'debug\', ' . DEBUG . '); in APP/config/core.php', E_USER_WARNING);
$_this->write('debug', DEBUG);
}
if (defined('CAKE_ADMIN')) {
@ -563,7 +564,7 @@ class Configure extends Object {
$_this->write('Routing.admin', CAKE_ADMIN);
}
if (defined('WEBSERVICES')) {
trigger_error('WEBSERVICES Deprecated: Use Router::parseExtensions();', E_USER_WARNING);
trigger_error('WEBSERVICES Deprecated: Use Router::parseExtensions(); or add Configure::write(\'Routing.webservices\', \'' . WEBSERVICES . '\');', E_USER_WARNING);
$_this->write('Routing.webservices', WEBSERVICES);
}
if (defined('ACL_CLASSNAME')) {