Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Solution for error 'The requested address '/' was not found on this server' in cake PHP

    • 0
    • 1
    • 1
    • 2
    • 0
    • 0
    • 0
    • 0
    • 2.42k
    Comment on it

    If anyone face the error 'The requested address '/' was not found on this server' in cakePHP, then try these two steps:-

    1. Add function date_default_timezone_set() somewhere in you cake/app folder.
    2. 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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: