0

My web host recently advised me that my site was being migrated (after the event). I am led to believe that this is in the interests of improving the service.
Immediately after the migration I discovered that one php file using date/time functions was stalling and numerous files were showing an errorWarning: phpinfo() [function.phpinfo]: 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 'Antarctica/Macquarie' for 'EST/10.0/no DST' instead in /home/safetyte/public_html/php_info.php on line 1.
After prolonged discussions, support advised me to add date_default_timezone_set('Australia/Melbourne'); immediately after session_start();. This did resolve the problem (that did not exist previously). As well as that, php.ini shows date.timezone as having no value. I raised this issue with support and was instructed to add the following to a htaccess file which I was to set up in the root.
Everything now works OK again, but I have a lingering feeling that I may have just been "sold a pup"
Can anyone who understands these things make comment?
I wonder if I've been moved to some sort of shared server.

3
Contributors
5
Replies
16
Views
3 Years
Discussion Span
Last Post by Dani
0

All these things you mention are the result of an upgrade of PHP. My guess is they upgraded to 5.4, which triggers these messages.

0

I have the same version PHP 5.4.3 on my WAMP server and there are none of these messages.

0

Quite possibly because WAMP server comes preinstalled with a matching PHP.INI. Upgrading a PHP version does not automatically add these required changes.

Edited by pritaeas

0

You can make the change in the php.ini file, but you can alternatively make the change at the top of the PHP script with something like this: date_default_timezone_set('America/New_York');

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.