Techracho

CakePHP+PHP5.3でstrtotimeエラー

このエントリーをはてなブックマーク Share
2009.11.25    CakePHP, PHP, 馬場      baba   

XAMPP最新版1.7.2では、PHPのバージョンが5.3になっています。

この環境でCakePHP(1.2.5)を使うと、以下のようなエラーが出ることがあります

Warning: strtotime() [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 ‘Asia/Tokyo’ for ‘9.0/no DST’ instead in …

この場合、cakeのapp/config/core.phpで以下の行のコメントアウトを外せばOKです。

date_default_timezone_set(’UTC’)

メッセージそのままで当たり前のことですが・・・

#関係ないですが、なんでCakePHP 1.2.5をインストールすると1.2.4.8284と出るんでしょうね?

COPYRIGHT [C] 2009 BEYOND PERSPECTIVE SOLUTIONS LTD. ALL RIGHTS RESERVED.