fedora12にアップグレードしてから、頻繁にWarningが出ていたので、対応したので、その手順。
warning strtotime() [http–php.net-function.strtotime] It is not safe to rely on the system’s timezone settings.
気まぐれ底辺プログラマ It is not safe to rely on the system’s timezone settings.
date関数で”Asia-Tokyo・・”なんかのエラーが出る件:PHP5.1.0以降
上記の情報に感謝です。m(_ _)m
以下が自分のerror_logの内容。
PHP Warning: date() [function.date]: 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() f
unction. 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 ‘JST/9.0/no DST’ instead in *** on line ***
timezoneの設定の問題なんですが、今まではこんな設定はしてませんでした。
どうやら、PHP5.1.系からの設定項目見たいです。
fedora11の時もPHP5.1.系だったような気がするんだが・・・。
ということで、「php.ini」の「date.timezone」を修正しました。
;date.timezone =
↓
date.timezone = Asia/Tokyo
に設定変更して、httpdをrestart。←これ忘れがち。でもないか。w
From xxxYukihiroxxx