After upgrading a Debian install to use PHP 5.4, I ran into the following error:
PHP Warning: Unknown: 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0
The easiest way to fix this (especially on Debian's PHP installs which has a weird .ini setup) is to create a separate .ini
file. IOW,
- Go to
/etc/php5/conf.d
- Create a file named
timezone.ini
- Add the following into it:
date.timezone = "America/Indianapolis"
You can find your own timezone here.
- Now, restart Apache (if that's your webserver) using
apache2ctl graceful
Hope this helps :)
- Log in to post comments