Urgent HELP please - PHP issues after Apache update

baggs1981

Verified User
Joined
Sep 18, 2006
Messages
66
Hi All,

I could really use some urgent help, I updated Apace on a server last night and all seemed fine but this morning it died.
php-fpm56 and php-fpm72 will not run

Code:
[root@server01 custombuild]# journalctl -xe
--
-- The result is failed.
Feb 29 09:12:22 server01.SERVERREDACTED systemd[1]: Unit php-fpm56.service entered failed state.
Feb 29 09:12:22 server01.SERVERREDACTED systemd[1]: php-fpm56.service failed.
Feb 29 09:12:24 server01.SERVERREDACTED kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:3e:12:a7:28:99:3a:4d:30:af:08:00 SRC=80.66.83.153 DST=207.180.214.27 LEN=44 TOS=0x00 PREC=0x00 TTL=247 ID=10820 PROTO=TCP SPT=52774 DPT=
Feb 29 09:12:27 server01.SERVERREDACTED systemd[1]: Starting The PHP FastCGI Process Manager...
-- Subject: Unit php-fpm72.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit php-fpm72.service has begun starting up.
Feb 29 09:12:27 server01.SERVERREDACTED php-fpm72[18734]: /usr/local/php72/sbin/php-fpm72: error while loading shared libraries: libjpeg.so.9: cannot open shared object file: No such file or directory
Feb 29 09:12:27 server01.SERVERREDACTED systemd[1]: php-fpm72.service: main process exited, code=exited, status=127/n/a
Feb 29 09:12:27 server01.SERVERREDACTED systemd[1]: Failed to start The PHP FastCGI Process Manager.
-- Subject: Unit php-fpm72.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit php-fpm72.service has failed.
--
-- The result is failed.
Feb 29 09:12:27 server01.SERVERREDACTED systemd[1]: Unit php-fpm72.service entered failed state.
Feb 29 09:12:27 server01.SERVERREDACTED systemd[1]: php-fpm72.service failed.
Feb 29 09:12:32 server01.SERVERREDACTED kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:3e:12:a7:28:99:3a:4d:30:af:08:00 SRC=80.66.83.153 DST=173.212.221.201 LEN=44 TOS=0x00 PREC=0x00 TTL=247 ID=24716 PROTO=TCP SPT=52790 DPT
Feb 29 09:12:32 server01.SERVERREDACTED systemd[1]: Starting The PHP FastCGI Process Manager...
-- Subject: Unit php-fpm72.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit php-fpm72.service has begun starting up.
Feb 29 09:12:32 server01.SERVERREDACTED php-fpm72[18743]: /usr/local/php72/sbin/php-fpm72: error while loading shared libraries: libjpeg.so.9: cannot open shared object file: No such file or directory
Feb 29 09:12:32 server01.SERVERREDACTED systemd[1]: php-fpm72.service: main process exited, code=exited, status=127/n/a
Feb 29 09:12:32 server01.SERVERREDACTED systemd[1]: Failed to start The PHP FastCGI Process Manager.
-- Subject: Unit php-fpm72.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit php-fpm72.service has failed.
--
-- The result is failed.
Feb 29 09:12:32 server01.SERVERREDACTED systemd[1]: Unit php-fpm72.service entered failed state.
Feb 29 09:12:32 server01.SERVERREDACTED systemd[1]: php-fpm72.service failed.
Feb 29 09:12:38 server01.SERVERREDACTED polkitd[598]: Registered Authentication Agent for unix-process:18751:201097 (system bus name :1.96 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/Authentica
Feb 29 09:12:38 server01.SERVERREDACTED systemd[1]: Starting The PHP FastCGI Process Manager...
-- Subject: Unit php-fpm56.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit php-fpm56.service has begun starting up.
Feb 29 09:12:38 server01.SERVERREDACTED php-fpm56[18767]: /usr/local/php56/sbin/php-fpm56: error while loading shared libraries: libjpeg.so.9: cannot open shared object file: No such file or directory
Feb 29 09:12:38 server01.SERVERREDACTED systemd[1]: php-fpm56.service: main process exited, code=exited, status=127/n/a
Feb 29 09:12:38 server01.SERVERREDACTED systemd[1]: Failed to start The PHP FastCGI Process Manager.
-- Subject: Unit php-fpm56.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit php-fpm56.service has failed.
--
-- The result is failed.
Feb 29 09:12:38 server01.SERVERREDACTED systemd[1]: Unit php-fpm56.service entered failed state.
Feb 29 09:12:38 server01.SERVERREDACTED systemd[1]: php-fpm56.service failed.
Feb 29 09:12:38 server01.SERVERREDACTED polkitd[598]: Unregistered Authentication Agent for unix-process:18751:201097 (system bus name :1.96, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected

[root@server01 custombuild]# yum install libjpeg9-dev
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Excluding mirror: mirror.fra1.de.leaseweb.net
 * base: asi-fs-n.contabo.net
Excluding mirror: mirror.de.leaseweb.net
 * epel: level66.mm.fcix.net
 * extras: centos.intergenia.de
Excluding mirror: mirror.fra1.de.leaseweb.net
 * updates: asi-fs-n.contabo.net
No package libjpeg9-dev available.
Error: Nothing to do
[root@server01 custombuild]# yum install libjpeg9-dev^C
[root@server01 custombuild]# service php-fpm72 start
Redirecting to /bin/systemctl start php-fpm72.service
Job for php-fpm72.service failed because the control process exited with error code. See "systemctl status php-fpm72.service" and "journalctl -xe" for details.
[root@server01 custombuild]# ^C
[root@server01 custombuild]# journalctl -xe
-- Subject: Unit php-fpm72.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit php-fpm72.service has begun starting up.
Feb 29 09:18:27 server01.SERVERREDACTED php-fpm72[25891]: /usr/local/php72/sbin/php-fpm72: error while loading shared libraries: libjpeg.so.9: cannot open shared object file: No such file or directory
Feb 29 09:18:27 server01.SERVERREDACTED systemd[1]: php-fpm72.service: main process exited, code=exited, status=127/n/a
Feb 29 09:18:27 server01.SERVERREDACTED systemd[1]: Failed to start The PHP FastCGI Process Manager.
-- Subject: Unit php-fpm72.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit php-fpm72.service has failed.
--
-- The result is failed.
Feb 29 09:18:27 server01.SERVERREDACTED systemd[1]: Unit php-fpm72.service entered failed state.
Feb 29 09:18:27 server01.SERVERREDACTED systemd[1]: php-fpm72.service failed.
Feb 29 09:18:29 server01.SERVERREDACTED kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:3e:12:a7:28:99:3a:4d:30:af:08:00 SRC=144.217.24.30 DST=173.212.221.201 LEN=60 TOS=0x00 PREC=0x00 TTL=54 ID=56267 DF PROTO=TCP SPT=52922
Feb 29 09:18:32 server01.SERVERREDACTED systemd[1]: Starting The PHP FastCGI Process Manager...
-- Subject: Unit php-fpm72.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit php-fpm72.service has begun starting up.
Feb 29 09:18:32 server01.SERVERREDACTED php-fpm72[25899]: /usr/local/php72/sbin/php-fpm72: error while loading shared libraries: libjpeg.so.9: cannot open shared object file: No such file or directory
Feb 29 09:18:32 server01.SERVERREDACTED systemd[1]: php-fpm72.service: main process exited, code=exited, status=127/n/a
Feb 29 09:18:32 server01.SERVERREDACTED systemd[1]: Failed to start The PHP FastCGI Process Manager.
-- Subject: Unit php-fpm72.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit php-fpm72.service has failed.
--
-- The result is failed.
Feb 29 09:18:32 server01.SERVERREDACTED systemd[1]: Unit php-fpm72.service entered failed state.
Feb 29 09:18:32 server01.SERVERREDACTED systemd[1]: php-fpm72.service failed.
Feb 29 09:18:40 server01.SERVERREDACTED kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:3e:12:a7:28:99:3a:4d:23:91:08:00 SRC=107.170.241.19 DST=207.180.214.27 LEN=40 TOS=0x00 PREC=0x00 TTL=239 ID=54321 PROTO=TCP SPT=53650 DP
Feb 29 09:18:44 server01.SERVERREDACTED kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:3e:12:a7:28:99:3a:4d:30:af:08:00 SRC=80.66.83.153 DST=207.180.214.27 LEN=44 TOS=0x00 PREC=0x00 TTL=247 ID=54272 PROTO=TCP SPT=52774 DPT=
Feb 29 09:18:50 server01.SERVERREDACTED kernel: Firewall: *UDP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:3e:12:a7:28:99:3a:4d:30:af:08:00 SRC=159.203.87.4 DST=173.212.221.201 LEN=76 TOS=0x00 PREC=0x00 TTL=245 ID=54321 PROTO=UDP SPT=51089 DPT
Feb 29 09:18:53 server01.SERVERREDACTED kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:3e:12:a7:28:99:3a:4d:23:91:08:00 SRC=35.203.210.102 DST=173.212.221.201 LEN=44 TOS=0x00 PREC=0x00 TTL=244 ID=54321 PROTO=TCP SPT=54757 D
Feb 29 09:18:54 server01.SERVERREDACTED kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:3e:12:a7:28:99:3a:4d:30:af:08:00 SRC=80.66.83.177 DST=207.180.214.27 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID=33599 PROTO=TCP SPT=45881 DPT=
Feb 29 09:18:56 server01.SERVERREDACTED polkitd[598]: Registered Authentication Agent for unix-process:25912:238963 (system bus name :1.104 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/Authentic
Feb 29 09:18:56 server01.SERVERREDACTED systemd[1]: Starting The PHP FastCGI Process Manager...
-- Subject: Unit php-fpm72.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit php-fpm72.service has begun starting up.
Feb 29 09:18:56 server01.SERVERREDACTED php-fpm72[25928]: /usr/local/php72/sbin/php-fpm72: error while loading shared libraries: libjpeg.so.9: cannot open shared object file: No such file or directory
Feb 29 09:18:56 server01.SERVERREDACTED systemd[1]: php-fpm72.service: main process exited, code=exited, status=127/n/a
Feb 29 09:18:56 server01.SERVERREDACTED systemd[1]: Failed to start The PHP FastCGI Process Manager.
-- Subject: Unit php-fpm72.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit php-fpm72.service has failed.
--
-- The result is failed.
Feb 29 09:18:56 server01.SERVERREDACTED systemd[1]: Unit php-fpm72.service entered failed state.
Feb 29 09:18:56 server01.SERVERREDACTED systemd[1]: php-fpm72.service failed.
Feb 29 09:18:56 server01.SERVERREDACTED polkitd[598]: Unregistered Authentication Agent for unix-process:25912:238963 (system bus name :1.104, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected
Feb 29 09:18:58 server01.SERVERREDACTED kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:3e:12:a7:28:99:3a:4d:23:91:08:00 SRC=196.36.152.50 DST=207.180.214.27 LEN=40 TOS=0x00 PREC=0x00 TTL=244 ID=56002 PROTO=TCP SPT=51915 DPT
lines 2126-2187/2187 (END)

In DA admin custombuild says they are missing?!?

1709198704741.png

Trying to update or build them give errors:

checking for PCRE headers location... configure: error: Could not find pcre.h in /usr/local
install_php: failed to compile '/usr/local/directadmin/custombuild/cache/php-7.2.34.tar.gz' inside '/usr/local/directadmin/custombuild/tmp/tmp.RyiewkaDa5.php-7.2.34.tar.gz'

Trying to install PCRE again says it's already installed:

1709198770761.png

Doing php -v gives:

[root@server01 local]# php -v
php: error while loading shared libraries: libjpeg.so.9: cannot open shared object file: No such file or directory

But again, trying to install this says it is already there.

Could really do with some help ASAP and happy to get help for hire.
 
remove this library from includes check if PHP run's normally, then on working PHP try to recompile libjpeg.
Also check if you have any customizations for PHP in custombuild
Check paths where PHP looks for libjpeg and where it really exist
 
remove this library from includes check if PHP run's normally, then on working PHP try to recompile libjpeg.
Also check if you have any customizations for PHP in custombuild
Check paths where PHP looks for libjpeg and where it really exist
Thanks so much for quick reply, my brain is a mangle atm I don't suppose I could trouble you to expand on how to do those things a bit?
 
check includes here:
/usr/local/php56/lib/php.conf.d/
/usr/local/php72/lib/php.conf.d/
 
remove this library from includes check if PHP run's normally, then on working PHP try to recompile libjpeg.
Also check if you have any customizations for PHP in custombuild
Check paths where PHP looks for libjpeg and where it really exist
check includes here:
/usr/local/php56/lib/php.conf.d/
/usr/local/php72/lib/php.conf.d/
Thanks,

For /usr/local/php56/lib/php.conf.d/ it has:

extension_dir=/usr/local/php56/lib/php/extensions/no-debug-non-zts-20131226
zend_extension=/usr/local/lib/ioncube/ioncube_loader_lin_5.6.so
zend_extension=/usr/local/lib/ZendGuardLoader5.6.so

For /usr/local/php56/lib/php.conf.d/ it has:
extension_dir=/usr/local/php72/lib/php/extensions/no-debug-non-zts-20170718
zend_extension=/usr/local/lib/ioncube/ioncube_loader_lin_7.2.so

and

[PATH=/var/www/html]
session.save_path=/var/www/tmp
upload_tmp_dir=/var/www/tmp
disable_functions=exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname



In /usr/local/directadmin/custombuild/custom there is nothing for php

In /usr/local/directadmin/custombuild/configure/php there is a file for various php versions.

I need php 5.6 and 7.2 working (and were working fine so I think they are still on the system).

the 5.6 file has:

Code:
#!/bin/sh

# Add stack canaries
export CFLAGS="${CFLAGS} -fstack-protector-strong"

# Fortify core stdlib functions
export CFLAGS="${CFLAGS} -D_FORTIFY_SOURCE=1 -O1"

# For compatibility with new ICU versions
export CXXFLAGS="${CXXFLAGS} -DU_USING_ICU_NAMESPACE=1"

./configure \
        --with-pic \
        --enable-embed \
        --prefix=/usr/local/php56 \
        --program-suffix=56 \
        --enable-fpm \
        --with-fpm-systemd \
        --with-litespeed \
        --with-config-file-scan-dir=/usr/local/php56/lib/php.conf.d \
        --with-curl \
        --with-gd \
        --enable-gd-native-ttf \
        --with-gettext \
        --with-jpeg-dir=/usr \
        --with-freetype-dir=/usr \
        --with-libxml-dir=/usr \
        --with-kerberos \
        --with-openssl \
        --with-mcrypt \
        --with-mhash \
        --with-mysql=mysqlnd \
        --with-mysql-sock=/var/lib/mysql/mysql.sock \
        --with-mysqli=mysqlnd \
        --with-pdo-mysql=mysqlnd \
        --with-pear \
        --with-png-dir=/usr \
        --with-xsl \
        --with-zlib \
        --enable-zip \
        --enable-bcmath \
        --enable-calendar \
        --enable-exif \
        --enable-ftp \
        --enable-sockets \
        --enable-soap \
        --enable-mbstring \
        --enable-intl
 
in my Almalinux 8.9
console command:
whereis libjpeg
shows
libjpeg: /usr/lib64/libjpeg.so
chech if you have it, maybe you need to build/rebuild it. Did you update DA and OS packages before rebuilding PHP?
 
in my Almalinux 8.9
console command:
whereis libjpeg
shows
libjpeg: /usr/lib64/libjpeg.so
chech if you have it, maybe you need to build/rebuild it. Did you update DA and OS packages before rebuilding PHP?
Thanks, mine says:
libjpeg: /usr/lib64/libjpeg.so

Also:

[root@server01 php.conf.d]# locate libjpeg.so
/usr/lib64/libjpeg.so
/usr/lib64/libjpeg.so.62
/usr/lib64/libjpeg.so.62.1.0


But php complains error while loading shared libraries: libjpeg.so.9
There is no libjpeg.so.9 file on the system.
 
as workaround - try create relative symlink with name libjpeg.so.9 linked to /usr/lib64/libjpeg.so
----
but I think if you rebuilded apache - you need to rebuild PHP too to receive new links to updated libraries.
 
as workaround - try create relative symlink with name libjpeg.so.9 linked to /usr/lib64/libjpeg.so
----
but I think if you rebuilded apache - you need to rebuild PHP too to receive new links to updated libraries.
Thanks, I tried to re-build php but get error:

[root@server01 custombuild]# ./build php

checking for PCRE headers location... configure: error: Could not find pcre.h in /usr/local
install_php: failed to compile '/usr/local/directadmin/custombuild/cache/php-5.6.40.tar.gz' inside '/usr/local/directadmin/custombuild/tmp/tmp.a8iRod5cFd.php-5.6.40.tar.gz'

When I look for pcre.h I get:

[root@server01 local]# locate pcre.h
/usr/include/pcre.h
/usr/local/directadmin/custombuild/clamav-0.101.2/libclamav/matcher-pcre.h
/usr/local/directadmin/custombuild/clamav-0.101.2/libclamav/regex_pcre.h
/usr/local/include/php/ext/pcre/php_pcre.h
/usr/local/php56/include/php/ext/pcre/php_pcre.h
/usr/local/php72/include/php/ext/pcre/php_pcre.h
/usr/share/doc/pcre-devel-8.32/html/pcre.html
 
as workaround - try create relative symlink with name libjpeg.so.9 linked to /usr/lib64/libjpeg.so
----
but I think if you rebuilded apache - you need to rebuild PHP too to receive new links to updated libraries.
I found where this was and created a sym link to it, now the build goes further but errors:error: Please reinstall the iconv library
 
so try reinstall this lib from OS packages, or restore from old removals
 
so try reinstall this lib from OS packages, or restore from old removals
Thanks, OK I've done that and now another error when trying to build php:

configure: error: Unable to detect ICU prefix or /usr/local/icu/bin/icu-config failed. Please verify ICU install prefix and make sure icu-config works.
 
In case anyone else reads through this, the fix was following through these steps even if it seems they are already removed:


DA support advised to NOT reinstate any of the libs which it was asking for and I've done in the attempts to fix.
 
Back
Top