Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php Warning: strtotime() Error

I have changed my joomla and wordpress files from old server to new server. In the front end and admin side its working without any errors. But in the Database (phpmyadmin) Section it shows some warning messages like this..

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/Calcutta' for 'IST/5.0/no DST' instead in /usr/share/phpmyadmin/libraries/db_info.inc.php on line 88

Warning: strftime() [function.strftime]: 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/Calcutta' for 'IST/5.0/no DST' instead in /usr/share/phpmyadmin/libraries/common.lib.php on line 1483

Can you please suggest, how to hide these warning messages??

Thanks in advance.

like image 340
Kavithanbabu Avatar asked Feb 18 '23 11:02

Kavithanbabu


2 Answers

Do you really just want to hide the error message or do you want to solve the problem, they're indicating?

On your new server, you should find a setting date.timezone in your php.ini file commented out. Here, you have to specify the timezone your server is located in. For instance, my server is located in Germany, so I use Europe/Berlin here:

date.timezone = Europe/Berlin

You find a complete list of supported timezones here:

http://www.php.net/manual/en/timezones.php

After changing this setting, restart your web server and the warnings should be gone.

like image 198
Alexander M. Turek Avatar answered Feb 26 '23 20:02

Alexander M. Turek


See how to use error_reporting, http://php.net/manual/en/function.error-reporting.php

like image 41
sanj Avatar answered Feb 26 '23 19:02

sanj