Website Broken following PHP Version change and attempt to upgrade Concrete to V9

My host upgraded my PHP version to 8.1 (from 7.1) and the whole website went offline, there is no rollback option for the PHP Change. I believe the website was running Concrete version 8.2.1 with the Stucco theme.

I tried to update the website to Concrete V9 so that it would work with PHP 8+ but encountered a new problem as below and assume I’ve done something wrong but cannot fix it:-

I usually use the update facility within the website, but could not as it’s offline so attempted to follow these instructions:-

I can’t access the dashboard, I don’t use composer and I cannot do a command line update so attempted these instructions for update:-

Replacing Original Concrete Directory (Version 8+)

** Download core from Concrete CMS download page.*
** Replace the concrete directory in web root.*
** Empty updates directory.*
** Delete application/config/update.php.*
** Replace composer.json and composer.lock (if pre-8.2.0).*
** Visit your site; Concrete will run required database migrations.*

I’m not confident I did this line correctly:-

** Replace composer.json and composer.lock (if pre-8.2.0).*

Could anybody please urgently advise what I need to do to resolve this?

Thank you for reading.

I could probably help by copying your site down to a local development environment, get it upgraded so it’s v9/php8 compatible, then overwrite the current site/database with the updated one.

I have had very little success upgrading sites using the web interface because the requests generally timeout before the upgrade completes.

Did you create a backup of the site files and database before you started this process?

After much begging, my host has been able to roll my PHP version back to 7.2 after all (although I will need to upgrade soon as it’s due to permanently move to version 8). I’ve undone all changes and restored the original Concrete directory (I copied it before deletion for the new one). However, it’s still not working. I now get a HTTP Error 500 (i’ve cleared CACHE etc).

Error log contains this:-

[04-Sep-2024 07:47:54 America/Boise] PHP Fatal error: Cannot use Concrete\Core\Foundation\Object as Object because ‘Object’ is a special class name in /home4/infinja3/public_html/concrete/src/Foundation/ClassLoader.php on line 5

You could possibly have stepped back to an older core than you intended, one before the Object class was replaced because Object became a reserved word. Have you undone all the empty/delete/replace steps you listed above?

Thanks for your reply. Unfortunately, I replaced the original concrete folder with the backup I took before starting the process so it should be exactly the same as I didn’t download an older core.

The webhost wasn’t sure if I had PHP 7.1 or 7.2 before, they’ve now rolled it back further to PHP7.1 and it’s loading the page but giving me this new error.

The pointer to the current core is in /application/config, so stepping back the /concrete folder will not undo changes made to /application/config.