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
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.
Click below to sign up and get $100 of credit to try our products over 60 days!
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:
Regards, Bobby