Warning: strtotime() – PHP 5.3 and Joomla!

If you suddenly, unexpectedly, on the main page of your Joomla! received a message : „Warning: strtotime() [ function.strtotime]: It is not safe to rely on the system’s timezone settings (…)”, don’t worry, and do not panic.

It means that your hosting company, or you yourself have changed on the latest versions of PHP 5.3. Unfortunately, the “old” versions of Joomla! presents just such a warning. It is because of that PHP 5.3 requires the time zone settings.

There are three ways to make this message disappear:

Depending on your location you can set a specific date.timezone value in PHP using the following code which should be added to your local php.ini file, for example:

date.timezone = "Europe/Warsaw"

or

date.timezone = "Europe/London" . 

Check list of supported Timezones.

If you do not have access to php.ini (as it happens) – then you have to edit the file .htaccess – adding the line: php_value date.timezone Europe/Warsaw

Of course, zou can also, disable the display of all errors and warnings from your page. Both from within the admin Joomla! as well as hosting the panel, or simply by using the entries. htaccess (php_flag display_errors off) or php.ini (display_errors = off;). Disabling this option will also increase the security of your CMS, because the hacker will not see the system error messages, which may difficult him a little job.

Warning: strtotime() – PHP 5.3 and Joomla! 4.675 (93.33%) 3 votes
Share
This article was first published June 16th, 2011