服務器上我有php 5.3.2和cakephp 1.3。CakePHP 1.3和PHP 5.3.2的時區和更多問題
當我運行CakePHP程序,它給了我以下錯誤:
Warning (2): strtotime() [ http://php.net/function.strtotime] : It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead [ROOT/cakephp/cake/libs/cache.php, line 570]
另外,我也得到了一些更errros:在php.ini
Notice: Trying to get property of non-object in /htdocs/cakephp/cake/libs/cache/file.php on line 248 Fatal error: Call to a member function cd() on a non-object in /htdocs/cakephp/cake/libs/cache/file.php on line 248
時區被定義爲歐洲/倫敦
我總是得到那個錯誤,儘管我定義或不是date_default_timezone_set('UTC')
,或歐洲/倫敦,或其他...
很無奈.........請幫助...
UPDATE:什麼是錯的我安裝PHP的...如果我跑
<?php echo date('Y'); ?>
...它給我空白屏幕。沒有結果...
有沒有問題?
你有沒有嘗試過在你的代碼中聲明時區?也許在你的app_controller的beforeFilter()? – 2010-07-30 10:18:58
看起來像我有一些安裝PHP的問題...請看看我的問題的更新部分。 – user198003 2010-07-30 10:48:19
***注意:*** php-cli的'php.ini'文件與'apache2'的'php.ini'文件不同。我建議將符號鏈接到另一個以保持同步並避免混淆! – 2014-02-15 19:47:10