Commit
…broot/index.php
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,8 +122,10 @@ protected function _bootstrap() { | |
define('ROOT', $this->params['root']); | ||
define('APP_DIR', $this->params['app']); | ||
define('APP', $this->params['working'] . DS); | ||
define('WWW_ROOT', APP . $this->params['webroot'] . DS); | ||
if (!is_dir(ROOT . DS . APP_DIR . DS . 'tmp')) { | ||
if (!defined('WWW_ROOT')) { | ||
define('WWW_ROOT', APP . $this->params['webroot'] . DS); | ||
} | ||
if (!defined('TMP') && !is_dir(APP . 'tmp')) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
markstory
Member
|
||
define('TMP', CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'Templates' . DS . 'skel' . DS . 'tmp' . DS); | ||
} | ||
$boot = file_exists(ROOT . DS . APP_DIR . DS . 'Config' . DS . 'bootstrap.php'); | ||
|
2 comments
on commit 8150b89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats actually a relativly common cause of permission problems, where the cli user and the webserver user end up being unable to delete (or worse - read) tmp files created by the other user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree on that one too, but I don't think the skel
dir should be supposed to contain those files either.
If you config a FileLog
without the path
parameter, and you use CakePHP
as it is... no special cases here, those files should end up somewhere to be found, not in an obscure directory where you can only find digging in the code.
If the webroot TMP
is not a place for them, sys_get_temp_dir()
is the place where I would expect them to be if I don't define a path
.
Shouldn`t the TMP dir when in cli mode be located in the same place as the web mode?¿