PDA

View Full Version : Help 4.1.5 to 4.2.2


WolfWiz
05-09-2015, 05:51 AM
Just did the upgrade on Vb4 and all went smooth in scripting. However I am getting this when I try to access site and nothing else.

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Denver' for 'MDT/-6.0/DST' instead in ..../includes/functions.php on line 5110
Unable to add cookies, header already sent.
File: /home1/tellyour/public_html/epidog/includes/class_core.php
Line: 5755

Can someone please help me.

THanks

--------------- Added 1431162448 at 1431162448 ---------------

Disregard fixed!

WEBDosser
05-09-2015, 07:47 AM
This might help..
http://www.vbulletin.com/forum/forum/vbulletin-4/vbulletin-4-installations-and-upgrades/4000792-urgent-help-error-after-upgrading-to-vb4-2-2-warning-date-function-date-it-is-not-safe?p=4003333#post4003333

Lynne
05-10-2015, 12:44 AM
This is a server configuration issue and should be set at the server level in the php.ini file. However you can override the issue by setting a locale in your config.php file.

See: http://php.net/manual/en/function.date-default-timezone-set.php

You would use something like:

date_default_timezone_set ('America/Los_Angeles');

You can find all timezones here: http://www.php.net/manual/en/timezones.php

Really should be set in the php.ini file in this section of code:

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

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

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

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

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

Turning display errors off would also eliminate the problem. They aren't errors, simply warnings. They are due to how PHP has changed over the years. Previous to vBulletin 4.2.2, they were suppressed because vBulletin didn't know how to deal with them. You can turn off the display of warnings in 4.2.2 by adding this line of code at the top of your config.php under <?:

define('SKIP_DS_ERRORS', true);