date.timezone issue in php script install

5 posts / 0 new
Last post
#1 Thu, 05/24/2012 - 13:47
midol

date.timezone issue in php script install

Warning: 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 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in PEAR/Validate.php on line 486

I've gone into the virtual host's /etc/php.ini file and specifically uncommented and set this value to:

date.timezone = "America/Vancouver"

and still get the error.

Advice?

Dave

Thu, 05/24/2012 - 19:08
helpmin

did you restart the web server?

Fri, 05/25/2012 - 14:43 (Reply to #2)
midol

I cross posted to the egroupware users list and got this:

> I've gone into the virtual host's /etc/php.ini file and specifically
> uncommented and set this value to:
>
> date.timezone = "America/Vancouver"
 
That's the right thing to do.
 
> and still get the error.
 
Two possibilities causing that:
 
a) Virtualmin uses it's private php.ini
b) some distros (Debian, openSUSE, ...) have a php.ini for Apache and 
one for cli (command line scripts)
 
Ralf

does VM have and/or use a private php.ini? and where is it?

The distro is Centos 5.8

Dave

Fri, 05/25/2012 - 15:02
andreychek

does VM have and/or use a private php.ini? and where is it?

Indeed it does -- you can edit the php.ini for your Virtual Server in $HOME/etc/php.ini.

-Eric

Fri, 05/25/2012 - 23:50 (Reply to #4)
midol

This is for /etc/php.ini

# grep "zone" php.ini
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
;date.timezone =

and this for the relevant /home etc/php5/php.ini

grep "zone" php.ini
; Defines the default timezone used by the date functions
date.timezone = "America/Vancouver"

I would expect the local copy to be definitive, is that so?

D

Topic locked