PDA

View Full Version : Upgrade to 4.2.2 failed.


NeoDio
10-13-2013, 07:31 PM
Hello, I tried upgrading my vBulletin 4.2.1 forum to 4.2.2 today. I followed the guide step by step to upgrade it. (https://www.vbulletin.com/docs/html?manualversion=40201601)

Once I got done with all of it, I started getting Warnings everywhere about the timezone and two of my plugins. The admin panel was a complete blank except for the warnings.

I've already reverted my forum and database to the backups I created before I started the upgrade, but I would like some help on this issue if you don't mind.

Here are the Warnings I would get:

Warning: Non-static method VBSHOUT_CACHE::init() should not be called statically, assuming $this from incompatible context in ..../dbtech/vbshout/hooks/global_start.php on line 16

Warning: Non-static method VBMAIL_CACHE::init() should not be called statically, assuming $this from incompatible context in ..../dbtech/vbmail/hooks/global_start.php on line 14

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/Chicago' for 'CDT/-5.0/DST' instead in ..../includes/functions.php on line 4912

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/Chicago' for 'CDT/-5.0/DST' instead in ..../includes/functions.php on line 5104

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/Chicago' for 'CDT/-5.0/DST' instead in ..../includes/functions.php on line 5093

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/Chicago' for 'CDT/-5.0/DST' instead in ..../includes/functions.php on line 5038


We use Hostgator as a web hosting provider and we don't have access to the php.ini file to change the timezone settings.

Thank you for your time, and have a good day.

ozzy47
10-13-2013, 07:36 PM
For the vBMail and vBShout, get the files, and update the mods, and the errors for them will go away.

As for the time ones, you can make the changes in your includes/config.php file, see here, http://www.vbulletin.com/forum/forum/vbulletin-4/vbulletin-4-questions-problems-and-troubleshooting/4000411-common-issues-4-2-2?p=4000425#post4000425

donald1234
10-13-2013, 08:41 PM
If you have access to your php.ini file, you can update your timezone info there. eg Europe/London

Lynne
10-13-2013, 08:45 PM
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 using this line of code at the top of your config.php under <?:

ini_set('display_errors', 'Off');

NeoDio
10-14-2013, 04:18 AM
For the vBMail and vBShout, get the files, and update the mods, and the errors for them will go away.

As for the time ones, you can make the changes in your includes/config.php file, see here, http://www.vbulletin.com/forum/forum/vbulletin-4/vbulletin-4-questions-problems-and-troubleshooting/4000411-common-issues-4-2-2?p=4000425#post4000425

Thank you! I didn't realize my plugins were out of date. Guess I should start checking them more often.

If you have access to your php.ini file, you can update your timezone info there. eg Europe/London

I said in my post that I don't have access to the php.ini file. But I've already used Lynne's advice and used the date_default_timezone_set function in the config.php file.

Thank you everyone who helped out. Have a good day!