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

did you restart the web server?

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

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

This is for /etc/php.ini [code]

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 =[/code]

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