Home arrow Journal arrow PHP Timezone Error Fix
PHP Timezone Error Fix PDF
Monday, 18 August 2014
If you get the following error when you try to access a PHP site from your web browser :

Warning: 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() 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.

then you must edit /usr/local/etc/php.ini file and manually add a time zone in [Date] section:

date.timezone = Europe/Paris

Then restart your web server:

  /usr/local/etc/rc.d/apache24 restart

Last Updated ( Monday, 18 August 2014 )
< Prev   Next >

Other BSD Systems





Best BSD firewall?