I have two versions of PHP on my CentOS 7 Apache server:
- 5.6
- 7.2
It was working but now I'm getting some weird errors that I can't decipher or use to debug.
Doing:
$ sudo service php72-php-fpm restart
showed me this:
Job for php72-php-fpm.service failed because a fatal signal was delivered causing the control process to dump core. See "systemctl status php72-php-fpm.service" and "journalctl -xe" for details.
Running:
$ systemctl status php72-php-fpm.service
Showed:
php72-php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php72-php-fpm.service; enabled; vendor preset: disabled)
Active: failed (Result: core-dump) since Tue 2019-04-09 12:09:33 BST; 40s ago
Process: 15205 ExecStart=/opt/remi/php72/root/usr/sbin/php-fpm --nodaemonize (code=dumped, signal=SEGV)
Main PID: 15205 (code=dumped, signal=SEGV)
Apr 09 12:09:32 localhost.localdomain systemd[1]: Starting The PHP FastCGI Process Manager...
Apr 09 12:09:32 localhost.localdomain php-fpm[15205]: [09-Apr-2019 12:09:32] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'oci8' (tried: /opt/remi/php72/root/usr/lib64/php/modules/oci8 (/opt/remi/php72...
Apr 09 12:09:32 localhost.localdomain php-fpm[15205]: [09-Apr-2019 12:09:32] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_oci' (tried: /opt/remi/php72/root/usr/lib64/php/modules/pdo_oci (/opt/remi...
Apr 09 12:09:33 localhost.localdomain systemd[1]: php72-php-fpm.service: main process exited, code=dumped, status=11/SEGV
Apr 09 12:09:33 localhost.localdomain systemd[1]: Failed to start The PHP FastCGI Process Manager.
Apr 09 12:09:33 localhost.localdomain systemd[1]: Unit php72-php-fpm.service entered failed state.
Apr 09 12:09:33 localhost.localdomain systemd[1]: php72-php-fpm.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
and
$ journal -xe
Showed nothing to do with the service.
How do I go about debugging and fixing this?
Best Answer
From pasted error, you have installed oci8 extension without having oracle library (version 18.3).
Install the library from Oracle site, and fix LD_LIBRARY_PATH for FPM.
You can either
echo /usr/lib/oracle/18.3/client64/lib >>/etc/ld.so.conf.d/oracle.conf
Or
systemctl edit php72-php-fpm
And add a Environnement directive there
If you don't need this extension, simply remove it
If updated from a previous version, build with an older client library version, you need to also update the library.