Issue with CentOS 7 and php 7.4 during oniguruma update

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
9,051
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:
  1. CentOS 7
  2. php 7.4 (all modes: php-fpm, cli, fastcgi)
  3. yum update of oniguruma package
Cause
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
 

Migdiradmin

Verified User
Joined
Jan 5, 2020
Messages
78
Today, after cron reload services or auto updates and one yum update.

This is the same problem?

Code:
server systemd: php-fpm74.service: main process exited, code=exited, status=127/n/a
server systemd: Unit php-fpm74.service entered failed state.
server systemd: php-fpm74.service failed.
server systemd: Starting The PHP FastCGI Process Manager...
server php-fpm74: /usr/local/php74/sbin/php-fpm74: error while loading shared libraries: libonig.so.2: cannot open shared object file: No such file or directory
server systemd: php-fpm74.service: main process exited, code=exited, status=127/n/a
server systemd: Failed to start The PHP FastCGI Process Manager.
server systemd: Unit php-fpm74.service entered failed state.
server systemd: php-fpm74.service failed.
 

Migdiradmin

Verified User
Joined
Jan 5, 2020
Messages
78
After the
Code:
/usr/local/directadmin/custombuild/build php n
php now starts but httpd stopped :(

Code:
server httpd: AH00526: Syntax error on line 12 of /etc/httpd/conf/extra/httpd-modsecurity.conf:
server httpd: Invalid command 'SecAuditLogFormat', perhaps misspelled or defined by a module not included in the server configuration
server systemd: httpd.service: main process exited, code=exited, status=1/FAILURE
server systemd: Failed to start The Apache HTTP Server.
server systemd: Unit httpd.service entered failed state.
server systemd: httpd.service failed.
 

Migdiradmin

Verified User
Joined
Jan 5, 2020
Messages
78
httpd working again

Code:
cd /usr/local/directadmin/custombuild
./build modsecurity
./build modsecurity_rules
 

kadek_mentik

Member
Joined
Jun 5, 2020
Messages
52
Location
Bali, Indonesia
How to configure php 7.3 to 7.4?
I see in CustomBuild, there are option to change its easily, look like this picture
1593603651953.png
I am using CentOs7
If i change 7.3 to 7.4 and click "save" button, there another things should i do?

Sorry, out of topic :)
Thanks you very much for help
 
Last edited:
Top