XF 2.3 500 Error Mid Upgrade

dvduval

Active member
I ran the upgrade and got a 500 error for the whole site. Everything is down. What would be the steps to troubleshoot?
It's for dance-forums.com

Found this in the error log

Sat Jul 06 18:19:09.515103 2024] [lsapi:error] [pid 70365:tid 47689249085184] [client 96.9.213.132:60447] [host www.dance-forums.com] Backend fatal error: PHP Fatal error: Uncaught Error: Class 'Doctrine\\Common\\Cache\\VoidCache' not found in /home/dancefo2/public_html/src/XF/CacheFactory.php:251\nStack trace:\n#0 /home/dancefo2/public_html/src/XF/CacheFactory.php(81): XF\\CacheFactory->createVoidCache(Array)\n#1 /home/dancefo2/public_html/src/XF/CacheFactory.php(36): XF\\CacheFactory->instantiate('Void', Array)\n#2 /home/dancefo2/public_html/src/XF/App.php(709): XF\\CacheFactory->create('Void', Array)\n#3 /home/dancefo2/public_html/src/XF/Container.php(234): XF\\App->XF\\{closure}('', Array, Object(XF\\Container))\n#4 /home/dancefo2/public_html/src/XF/App.php(2661): XF\\Container->create('cache', '')\n#5 /home/dancefo2/public_html/src/XF/App.php(736): XF\\App->cache('registry')\n#6 /home/dancefo2/public_html/src/XF/Container.php(31): XF\\App->XF\\{closure}(Object(XF\\Container))\n#7 /home/dancefo2/public_html/src/XF/App.php(1931): XF\\Container->offsetGet('registry')\n#8 /home/dancefo2/public_html/src/XF/Container.php(31): XF\\App->XF\\{closure}(Object(XF\\Container))\n#9 /home/dancefo2/public_html/src/X in /home/dancefo2/public_html/src/XF/CacheFactory.php on line 251\n
 
Last edited:
THE VERSION OF ALL ADDONS YOU USE is xenforo2.3Does it support ? Otherwise, you may get huge errors in PHP. Does your PHP version and Mysql or MariaDB version support it? Is it the recommended version?
 
@dvduval There is apparently an issue lingering with doing the upgrade with caching enabled.


Short of doing a restore, the advice from @Old Nick is correct. Here's what I ended up doing to fix my install on on of my sites tonight. Your individual solution may differ.
  • Edit your src/config.php file and change any references to 'cache' being turned on to be false. For example, if you see something like $config['cache']['enabled'] = true; then change it to be $config['cache']['enabled'] = false; instead. The only change being to change true to false.
  • Download the 2.3.0 upgrade package from XF account area.
  • Unzip the 2.3.0 upgrade package into a new folder.
  • FTP the contents of the upload folder to the server where XF is installed.
  • Using a command line, run the XF php cmd.php xf:upgrade upgrade command to finish the upgrade from the CLI instead of the GUI.

If you're not comfortable doing restores or working with the CLI then you may want to reach out to either your hosting provider for help (point them to this thread) or submitting an XF support ticket for help from the guys.

In my case, an interesting symptom was that when the GUI upgrade aborted and giving the 500 error, trying to do php cmd.php xf:upgrade command shows that it thought the install files were still the old XF 2.2.x version instead of the new 2.3.0 that should've been downloaded. It's why for me I ended up making sure I did the manual FTP of the 2.3.0 files to the server before continuing.

Honestly, getting the 500 error threw me off and I had an "Oh, shoot!" moment. 🤣 It served as a good reminder to me to take the advice about backing up first more seriously. :D
 
@dvduval There is apparently an issue lingering with doing the upgrade with caching enabled.


Short of doing a restore, the advice from @Old Nick is correct. Here's what I ended up doing to fix my install on on of my sites tonight. Your individual solution may differ.
  • Edit your src/config.php file and change any references to 'cache' being turned on to be false. For example, if you see something like $config['cache']['enabled'] = true; then change it to be $config['cache']['enabled'] = false; instead. The only change being to change true to false.
  • Download the 2.3.0 upgrade package from XF account area.
  • Unzip the 2.3.0 upgrade package into a new folder.
  • FTP the contents of the upload folder to the server where XF is installed.
  • Using a command line, run the XF php cmd.php xf:upgrade upgrade command to finish the upgrade from the CLI instead of the GUI.

If you're not comfortable doing restores or working with the CLI then you may want to reach out to either your hosting provider for help (point them to this thread) or submitting an XF support ticket for help from the guys.

In my case, an interesting symptom was that when the GUI upgrade aborted and giving the 500 error, trying to do php cmd.php xf:upgrade command shows that it thought the install files were still the old XF 2.2.x version instead of the new 2.3.0 that should've been downloaded. It's why for me I ended up making sure I did the manual FTP of the 2.3.0 files to the server before continuing.

Honestly, getting the 500 error threw me off and I had an "Oh, shoot!" moment. 🤣 It served as a good reminder to me to take the advice about backing up first more seriously. :D

Thank you! I'm going to try. I am an "old hack". It's been a while since I did things like this.
Asking Knownhost where src/config.php is located.
 
That didn't seem to work. I guess I am not skilled enough to solve it. I will try to find some developer to work on it on Monday. Pretty busy forum. But don't know what else to do.
 
Ok, I found outside help, and got it solved now. It kind of sucked that there was a known bug that wasn't fixed yet, but fortunately it was only down for about 24 hours. I think I may delay upgrading my other sites until 2.3 is a little more stable.
 
Back
Top Bottom