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?


Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


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

I’ve noticed a similar discussion here:

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