You are not logged in.

#1 2009-09-30 09:38:31

Snewp
Member
Registered: 2009-09-30
Posts: 2

PHP error

Hi, I'm trying to configure my archlinux box as a server with LAMP. I'm getting an error with PHP.

A PHP Error was encountered

Severity: Warning

Message: 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 'Asia/Hong_Kong' for 'HKT/8.0/no DST' instead

Filename: /imagevue/common.inc.php

Line Number: 135
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 'Asia/Hong_Kong' for 'HKT/8.0/no DST' instead in /srv/http/album/imagevue/common.inc.php on line 135

any ideas how to fix this? I'm not really sure if it is with the php config or with the code itself that i'm using. Thanks.

Offline

#2 2009-09-30 09:46:33

wuischke
Member
From: Suisse Romande
Registered: 2007-01-06
Posts: 630

Re: PHP error

This is just a warning and you can ignore it. To get rid of it add a call to date_default_timezone_set() to the beginning of your code, just as the warning message suggests.

But if things (i.e. time settings) worked correctly for now, you don't have to worry about this warning message and can ignore it.

Offline

#3 2009-09-30 09:57:37

Snewp
Member
Registered: 2009-09-30
Posts: 2

Re: PHP error

Thanks for the reply. By just adding the timezone in php.ini it solved the problem. Thanks smile

Offline

Board footer

Powered by FluxBB