Question

PHP compiling errors after install from ondrej/php repository

Hi, I’ve been using ppa:ondrej/php repository for many months, but today, after installing PHP 8.0 and 7.4 on a new fresh server, I noticed the following error:

PHP message: PHP Warning:  preg_match(): Compilation failed: unrecognised compile-time option bit(s) at offset 0 in <any_php_file>

This problem doesn’t occur with older versions of PHP (<=7.3) and have never occurred before. I tested on the latest versions of WordPress and Drupal. Anyone faced with a similar error recently?

Regards

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

Does it happen for a specific plugin or just a plain WordPress installation?

I’ve noticed a similar discussion here:

https://wordpress.org/support/topic/php-warning-preg_match-compilation-failed/

The suggestion is that a plugin or a theme that you are using might not be compatible with the newer PHP version in question.

You could also try updating your packages with:

sudo apt update
sudo apt upgrade

Regards, Bobby