In at the deep end - php7.4 and Objects

I’ve just been dropped in at the deep end - a client has concrete5 cms, been running for a good length of time. All key staff are absent on leave.

Hosting provider just magically upgraded php to 7.4.21, and the client version of Concrete5 now blows up because Object is now a reserved word!
So now nothing seems to run on the site - home page is 500, I don’t know of any admin pages I can access, and site is 5000 twisty passages all alike.

I have full ftp access to the site, and access to the database.

What is the shortest path to fixing this issue? Is there an upgrade script I can run ? I see stuff advising upgrades from within concrete5, but I don’t have that, and I am really reluctant to overwrite anything until I am confident I am not going to screw stuff up.

Reverting to an earlier php is not an option, I don’t think.

I am en experienced php programmer, but completely lacking in any knowledge of this framework.

Thanks in advance.

What core version is the site? If it is c5.6, then you can upgrade to c5.6.4.0 from legacy Github. If you can’t get the host to downgrade php, that will involve making a development clone, upgrading that, then copying the upgraded clone over the live site.
You will also need to update any application code and packages for php7.4.

If you are on a c5.7+ core, the process is similar, but you can follow the upgrades through to the latest core.

Thanks very much for your prompt reply. Where do I find the current version number ?

Regard
David

Assuming this is a pre-5.7 site, look in concrete/config/version.php
If it is a 5.7 or later site look in concrete/config/concrete.php

Old version is 5.7.5.6 , downloaded version is 8.5.5 .

Can you advise shortest / simplest upgrade procedure ? I can’t see where DB / Sql upgrade will happen.

David

You should be able to update in 2 stages.

  1. To 5.7.5.13
  2. Then to 8.5.5

The upgrade migrations are often a little buggy, especially to the first pont versions, but later migrations fixed the gaps left by earlier ones. Hence it is usually most reliable to go in the largest steps available.

Also usually best to do big upgrades manually through the CLI, so you don’t run into any execution limits.

Take files and database backups first.

As noted previously, ideally clone to a dev system, make the upgrades there, sort out any glitches, then copy back to the live site.

https://documentation.concretecms.org/developers/introduction/installation/upgrading-concrete5

1 Like