Site died: preg_match(): Compilation failed: invalid range in character class at offset 4

Permalink
Hi,

- concrete version: 8.4.3
- PHP version: 7.4

without applying any changes (on the content), last week, beginning of November 2020, the site died.
What is still there is the main menu (working) and the logo, other than that an error:

preg_match(): Compilation failed: invalid range in character class at offset 4

After searching the forums, I tried to step back the PHP version to 7.3 and 7.2, in the hope i could update concrete and fix this (Current concrete version = 8.4.3).

When I downstep PHP to 7.3 or 7.2, I get no content anymore, only the following error shows

An unexpected error occurred.
Erroneous data format for unserializing 'Zend\I18n\Translator\TextDomain'

Does anyone have an idea on how to fix this?

Thanks in advance!

 
Justin1978 replied on at Permalink Reply
Justin1978
Hi Jefpunk,

Pure from the information you provided I can't see what the underlying problem is but from what you have given here it looks like the preg_match does not give an error anymore and this now creates an error in the Zend\I18n\Translator class. It looks like this has something to with translations in Concrete and it might be a problem with the character set of your database seeing how the compilation of the regular expression now suddenly fails but that's just a wild guess on my side. You said you didn't apply content changes but seeing how you had to step down a PHP version my question is: am I correct to assume you did upgrade your php version recently or migrate the database?
jefpunk replied on at Permalink Reply
Hi Justin,

thank you very much for your reply.
The thing is, I have no control over what the hosting company is doing with DB or PHP. Apparently it was the PHP version. Setting it back to 7.2 did render the site functional again. However, when looking for updates, it said it was up to date.

Now, PHP 7.2 has expired (hosting company disabled it), and i cannot see the site anymore, nor access the admin part. So now I am looking for another way to update it, without the site being active.

Any clues anyone?

Thank you.
JohntheFish replied on at Permalink Reply
JohntheFish
Use FTP or your host cPanel uploader to create a new /concrete directory with the new core in it.

I usually create /new_concrete, then rename /concrete to /old_concrete and then rename /new_concrete to /concrete. That way you will not have copied over anything, just moved them round.

Then force an update via the CLI. https://documentation.concrete5.org/developers/framework/console-com...

Depending on versions, you may need to do this in multiple steps to get to the latest core. Read the release notes to make sure you are updating in the best steps available.

Take a backup of all site files and the database before starting.
jefpunk replied on at Permalink Reply
Hi John,

I was able to unzip the new core to /updates/ and fortunately had an old tab open in my browser, where i was in the admin part. I could do the update via the admin browser, and it worked like a charm.

Thanks for the help!