Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Installing on a Mac Server / Date & Time Zone issue with php.ini file

Date & Time Zone issue with php.ini file

Started by chad2012 on 22 Jan 2012, 5:21 PM · Views: 30,851

Results 1 to 3 of 3
22 Jan 2012, 5:21 PM
#1
chad2012 avatar

chad2012

New Zenner

Join Date:
Jan 2012
Posts:
10
Plugin Contributions:
0

Date & Time Zone issue with php.ini file

Zencart Version: 1.50
PHP Version: 5.3.4
Operating System: Mac Snow Leopard Server

I am having the following error on Zencart Install (first page of the install):
"ERROR: date.timezone not set in php.ini. Please contact your hosting company to set the timezone in the server PHP configuration before continuing."

I currently use and host Joomla products/sites on my server with no MYSQL & PHP issues. My Snow Leopard Server php.ini file located in the /etc directory has the following (originally commented out) under the date.timestamp area:

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone =

http://php.net/date.default-latitude
date.default_latitude = 31.7667

http://php.net/date.default-longitude
date.default_longitude = 35.2333

http://php.net/date.sunrise-zenith
date.sunrise_zenith = 90.583333

http://php.net/date.sunset-zenith
date.sunset_zenith = 90.583333

Does anyone know how to remedy this situation. I do not know the proper settings for this issue within the php.ini file. Does anything need to be changed in the configure.php file within the Zencart directory? Please note I have permissions set to 777 for all pertinent files shown in the book "e-Start Your Web Store with Zen Cart". Any help would be GREATLY APPRECIATED.

22 Jan 2012, 6:02 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Date & Time Zone issue with php.ini file

No, you don't need to alter the configure.php file for this.

You need to set your time zone in your php.ini file, just as the error message is telling you.

You can refer to:
http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
http://www.php.net/manual/en/timezones.php

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Jan 2012, 8:26 PM
#3
chad2012 avatar

chad2012

New Zenner

Join Date:
Jan 2012
Posts:
10
Plugin Contributions:
0

Re: Date & Time Zone issue with php.ini file

DrByte,

Thank you for your reply. I fixed this issue with the following in my php.ini file:

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = ('America/Phoenix')

;http://php.net/date.default-latitude
date.default_latitude = 31.7667

;http://php.net/date.default-longitude
date.default_longitude = 35.2333

;http://php.net/date.sunrise-zenith
date.sunrise_zenith = 90.583333

;http://php.net/date.sunset-zenith
date.sunset_zenith = 90.583333

After changing the php.ini file, I restarted the apache server and restarted the web browser. It works great. Thanks again!