- Joined
- Feb 27, 2003
- Messages
- 8,525
Hello,
We would like to make an announcement about an issue we've discovered about recent issues with PHP 7.4 on CentOS 7, requiring recompilation of PHP ("./build php n") after issuance of "yum update", even if this update was automated.
Affecting
Affecting systems with all 3 conditions:
The oniguruma library is no longer bundled with PHP 7.4, instead libonig needs to be available on the system (or --disable-mbregex used to disable the mbregex component). CentOS 7 epel repository, which was used for installation of oniguruma-devel by default, updated their library lately. The update swaps /usr/lib64/libonig.so.2 with /usr/lib64/libonig.so.5 and breaks the linking of the library for /usr/local/php74/sbin/php-fpm74 (and other) binary files, that results in PHP outage.
Errors
You'd see an error that might look like this:
Solution
A simple recompile of php will do the trick:
If you run multiple versions as PHP, and you'd like to recompile just PHP-FPM 7.4 (for example) you may use the following command:
We hope the advanced warning will help mitigate the issue for anyone affected.
John
We would like to make an announcement about an issue we've discovered about recent issues with PHP 7.4 on CentOS 7, requiring recompilation of PHP ("./build php n") after issuance of "yum update", even if this update was automated.
Affecting
Affecting systems with all 3 conditions:
- CentOS 7
- php 7.4 (all modes: php-fpm, cli, fastcgi)
- yum update of oniguruma package
The oniguruma library is no longer bundled with PHP 7.4, instead libonig needs to be available on the system (or --disable-mbregex used to disable the mbregex component). CentOS 7 epel repository, which was used for installation of oniguruma-devel by default, updated their library lately. The update swaps /usr/lib64/libonig.so.2 with /usr/lib64/libonig.so.5 and breaks the linking of the library for /usr/local/php74/sbin/php-fpm74 (and other) binary files, that results in PHP outage.
Errors
You'd see an error that might look like this:
Code:
/usr/local/bin/php: error while loading shared libraries: libonig.so.2: cannot open shared object file: No such file or directory
Solution
A simple recompile of php will do the trick:
Code:
/usr/local/directadmin/custombuild/build php n
If you run multiple versions as PHP, and you'd like to recompile just PHP-FPM 7.4 (for example) you may use the following command:
Code:
/usr/local/directadmin/custombuild/build php_expert 7.4 php-fpm
We hope the advanced warning will help mitigate the issue for anyone affected.
John