If anyone face the error 'The requested address '/' was not found on this server' in cakePHP, then try these two steps:-
- Add function date_default_timezone_set() somewhere in you cake/app folder.
- If above solution not works then place date_default_timezone_set('UTC') function in your /var/www/html/lib/Cake/Cache/cacheEngine.php file under the function init() like this:-
public function init($settings = array()) {
date_default_timezone_set('UTC'); // add new line
$settings += $this->settings + array(
'prefix' => 'cake_',
'duration' => 3600,
'probability' => 100,
'groups' => array()
);
$this->settings = $settings;
if (!empty($this->settings['groups'])) {
sort($this->settings['groups']);
$this->_groupPrefix = str_repeat('%s_', count($this->settings['groups']));
}
if (!is_numeric($this->settings['duration'])) {
$this->settings['duration'] = strtotime($this->settings['duration']) - time();
}
return true;
}
Second solution works for me. I hope it will work for you.
0 Comment(s)