If you want to try cakephp and extract it to Apache's Htdocs directory, access the Strtotime call about the problem, time zone settings related issues

Source: Internet
Author: User
To try CakePHP, extract it to Apache's Htdocs directory and access the Strtotime call problem, time zone setting problem
Here are the tips for accessing the index.php browser under the cakephp directory

PHP Code
  Warning (2): Strtotime () [Function.strtotime]: It is not safe to rely on the system ' s timezone settings. You is *required* to use the Date.timezone setting or the Date_default_timezone_set () function. In case you used any of those methods and you is still getting this warning, your most likely misspelled the timezone Iden Tifier. We selected ' UTC ' for ' 8.0/no DST ' instead [core\cake\libs\cache.php, line 597]code | context$settings = Array ("Engine" = "File", "path" = "I:\Apache\Apache2.2\htdocs\cakephp-1.3.9-0\app\") Tmp\cache\persistent\ "," prefix "=" cake_core_ "," lock "= False," serialize "= True," iswindows "= > True, "duration" = "+10 seconds", "probability" and "strtotime"-[internal], line?? Cacheengine::init ()-core\cake\libs\cache.php, Line 597fileengine::init ()-core\cake\libs\cache\file.php, line 81cache::_buildengine ()-core\cake\libs\cache.php, Line 166cache::config ()-core\cake\libs\cache.php, line 141Configure:: __loadbootstrap ()-core\cake\libs\configure.php, Line 421configure::getinstance ()-core\cake\libs\configure.php, Line 52include-core\cake\bootstrap.php, line 38require-app\webroot\index.php, line 76[main] – core\index.php, line 55N Otice:trying to get property of Non-object in I:\Apache\Apache2.2\htdocs\cakephp-1.3.9-0\cake\libs\cache\file.php on Line 248Fatal Error:call to a member function CD () on a non-object in I:\Apache\Apache2.2\htdocs\cakephp-1.3.9-0\cake\lib s\cache\file.php on line 248



I then looked at the source code it was prompting:

PHP Code
  Cache.phpclass cacheengine {/** * Settings of current Engine instance * * @var int * @access public */var $settings = Array ();/** * Initialize the cache engine * * called automatically by the cache frontend * * @param array $params associ ative array of parameters for the engine * @return Boolean True If the engine has been succesfully initialized, False if n OT * @access public */function init ($settings = Array ()) {$this->settings = array_merge (Array ('        Prefix ' + ' cake_ ', ' duration ' and 3600, ' probability ' + +, $this->settings, $settings        ); if (!is_numeric ($this->settings[' duration ')) {$this->settings[' duration '] = [color= #FF0000][del]strtoti Me[/del] ($this->settings[' duration ')-time ();        [/color]}    return true;    }/** * Garbage Collection * * Permanently remove all expired and deleted data * * @access public * * Function GC () { }/** * Write value for a key into CachE * * @param string $key Identifier for the data * @param mixed $value data to being cached * @param mixed $duration How long To cache the data, in seconds * @return Boolean True If the data is succesfully cached, false on Failure * @access Publi c/Function Write ($key, & $value, $duration) {Trigger_error (sprintf (__) (' Method write () not implemented in    %s ', true), Get_class ($this)), e_user_error); }/** * Read A key from the cache * * @param string $key Identifier for the data * @return mixed the cached data, or false        If the data doesn ' t exist, has expired, or if there is an error fetching it * @access public * * Function read ($key) {    Trigger_error (sprintf (__ (' Method read () Not implemented in%s ', true), Get_class ($this)), e_user_error); }/** * Increment A number under the key and return incremented value * * @param string $key Identifier for the data * @par Am integer $offset how much to add * @return New incremented value, FALSE otherwise * @access public */   function Increment ($key, $offset = 1) {Trigger_error (sprintf (' Method increment () not implemented in%s ', Tru    e), Get_class ($this)), e_user_error); }/** * Decrement a number under the key and return decremented value * * @param string $key Identifier for the data * @par Am integer $value how much to substract * @return New incremented value, FALSE otherwise * @access public */function D Ecrement ($key, $offset = 1) {Trigger_error (sprintf (' Method decrement () not implemented in%s ', true), Get_class    ($this)), e_user_error); }/** * Delete A key from the cache * * @param string $key Identifier for the data * @return Boolean True If the value is succesfully deleted, False if it didn ' t exist or couldn ' t is removed * @access public */function Delete ($key) {}/*  * * Delete all keys from the cache * * @param boolean $check If True would check expiration, otherwise Delete all * @return Boolean True if the cache was succesfully cleared, false otherwise * @access Public */function Clear ($check) {}/** * Cache Engine Settings * * @return Array Settings * @access public */F    Unction settings () {return $this->settings; }/** * Generates a safe key for use with cache engine storage engines. * * @param string $key The key passed over * @return mixed string $key or False * @access public * * Function key ($key)        {if (empty ($key)) {return false;        } $key = Inflector::underscore (str_replace (Array (DS, '/', '. '), ' _ ', Strval ($key)));    return $key; }}
  • Related Article

    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.