Cannot start/restart PHP 7.2 FPM service (CentOS 7, Apache) - php

I am trying to start PHP-FPM but I keep failing.
# sudo systemctl status rh-php72-php-fpm
The result is:
[0m rh-php72-php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/rh-php72-php-fpm.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 2020-07-06 09:51:09 KST; 18s ago
Process: 10442 ExecStart=/opt/rh/rh-php72/root/usr/sbin/php-fpm --nodaemonize (code=exited, status=127)
Main PID: 10442 (code=exited, status=127)
706 09:51:09 myserver systemd[1]: Starting The PHP FastCGI Process Manager...
706 09:51:09 myserver php-fpm[10442]: /opt/rh/rh-php72/root/usr/sbin/php-fpm: symbol lookup error: /opt/rh/rh-php72/root/usr/sbin/php-fpm: undefi..._jit_exec
706 09:51:09 myserver systemd[1]: rh-php72-php-fpm.service: main process exited, code=exited, status=127/n/a
706 09:51:09 myserver systemd[1]: Failed to start The PHP FastCGI Process Manager.
706 09:51:09 myserver systemd[1]: Unit rh-php72-php-fpm.service entered failed state.
706 09:51:09 myserver systemd[1]: rh-php72-php-fpm.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
It seems like I have a directory link issue, but have no idea.
Could anyone help me with this?

It was a library issue.
Thanks #Jeemusu

Related

php7.4-fpm fails to start - update PHP 7.3 to PHP 7.4 on VULTR Ubuntu 18.04 with nginx

I just tried to update the PHP Version of the nginx server and I get this message, when I enter systemctl status php7.4-fpm.service
php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-12-14 20:11:31 UTC; 4min 50s ago
Docs: man:php-fpm7.4(8)
Process: 9196 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 (code=exited, status=0/SUCCESS)
Process: 9178 ExecStart=/usr/sbin/php-fpm7.4 --nodaemonize --fpm-config /etc/php/7.4/fpm/php-fpm.conf (code=exited, status=78)
Main PID: 9178 (code=exited, status=78)
Dec 14 20:11:31 vultr.guest systemd[1]: Starting The PHP 7.4 FastCGI Process Manager...
Dec 14 20:11:31 vultr.guest php-fpm7.4[9178]: [14-Dec-2020 20:11:31] ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (98)
Dec 14 20:11:31 vultr.guest php-fpm7.4[9178]: [14-Dec-2020 20:11:31] ERROR: FPM initialization failed
Dec 14 20:11:31 vultr.guest systemd[1]: php7.4-fpm.service: Main process exited, code=exited, status=78/n/a
Dec 14 20:11:31 vultr.guest systemd[1]: php7.4-fpm.service: Failed with result 'exit-code'.
Dec 14 20:11:31 vultr.guest systemd[1]: Failed to start The PHP 7.4 FastCGI Process Manager.
Also if I check for the Version with php -v I get back the Version 7.4.13
However, if upload a test.php File with just <?php phpinfo();?> in it, the Server tells me that I still run on PHP Version 7.3.22-1+ubuntu18.04.1+deb.sury.org+1
Already tried to change the standard PHP version with sudo update-alternatives --set php /usr/bin/php7.4
Thanks for your help

Failed to start The PHP 7.2 FastCGI Process Manager

Trying to set up wordpress on my ubuntu 18.04.5 LTS server but seems to not be able to get past the following error when installing or updating any packages. When I enter sudo apt-get upgrade -y. I get the following error.
NOTICE: To enable PHP 7.2 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.2-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
Job for php7.2-fpm.service failed because the control process exited with error code.
See "systemctl status php7.2-fpm.service" and "journalctl -xe" for details.
invoke-rc.d: initscript php7.2-fpm, action "restart" failed.
● php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-11-18 09:45:24 CST; 7ms ago
Docs: man:php-fpm7.2(8)
Process: 20174 ExecStart=/usr/sbin/php-fpm7.2 --nodaemonize --fpm-config /etc/php/7.2/fpm/php-fpm.conf (code=exited, status=78)
Main PID: 20174 (code=exited, status=78)
Nov 18 09:45:24 makemctgreatagain systemd[1]: Starting The PHP 7.2 FastCGI Process Manager...
Nov 18 09:45:24 makemctgreatagain php-fpm7.2[20174]: [18-Nov-2020 09:45:24] ERROR: failed to open configuration file '/etc/php/7.2/fpm/php-fpm.conf': No such file or directory (2)
Nov 18 09:45:24 makemctgreatagain php-fpm7.2[20174]: [18-Nov-2020 09:45:24] ERROR: failed to load configuration file '/etc/php/7.2/fpm/php-fpm.conf'
Nov 18 09:45:24 makemctgreatagain php-fpm7.2[20174]: [18-Nov-2020 09:45:24] ERROR: FPM initialization failed
Nov 18 09:45:24 makemctgreatagain systemd[1]: php7.2-fpm.service: Main process exited, code=exited, status=78/n/a
Nov 18 09:45:24 makemctgreatagain systemd[1]: php7.2-fpm.service: Failed with result 'exit-code'.
Nov 18 09:45:24 makemctgreatagain systemd[1]: Failed to start The PHP 7.2 FastCGI Process Manager.
dpkg: error processing package php7.2-fpm (--configure):
installed php7.2-fpm package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
php7.2-fpm
E: Sub-process /usr/bin/dpkg returned an error code (1)
I'm not sure if I need to reinstall php or where to go from here.

MySQL service doesn't start on Ubuntu 14.04 after upgrading PHP from version 5.6 to 7.2

I have upgraded my PHP from version 5.6 to 7.2 and now MySQL does not work. When I enter sudo service mysqsl start, the following text gets displayed:
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
output of journalctl -xe
output of systemctl status mysql.service:
mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql)
Active: failed (Result: exit-code) since \u0633\u0647\u200c\u0634\u0646\u0628\u0647 2018-07-17 04:22:01 +0430; 27s ago
Docs: man:systemd-sysv-generator(8)
Process: 26938 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)
Process: 6860 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
Main PID: 9974 (code=exited, status=0/SUCCESS)
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine mysql[6860]: [97B blob data]
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine mysql[6860]: Fatal error in defaults handling. Program aborted
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine /etc/init.d/mysql[7565]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine /etc/init.d/mysql[7565]: [61B blob data]
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine /etc/init.d/mysql[7565]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine mysql[6860]: ...fail!
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine systemd[1]: mysql.service: Control process exited, code=exited status=1
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine systemd[1]: mysql.service: Unit entered failed state.
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine systemd[1]: mysql.service: Failed with result 'exit-code'.
How can I fix this problem? I need to start MySQL.

php-fpm can't start up "unknown entry '$listen'"

I install php7 on centos7,but I use 'systemctl start php-fpm' command,
it can't startup,so I execute "systemctl status php-fpm.service",and get the result below:
# systemctl status php-fpm.service
● php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2018-03-03 15:31:52 EST; 7min ago
Process: 12841 ExecStart=/usr/sbin/php-fpm --nodaemonize (code=exited, status=78)
Main PID: 12841 (code=exited, status=78)
Mar 03 15:31:51 instance-1 systemd[1]: Starting The PHP FastCGI Process Manager...
Mar 03 15:31:52 instance-1 php-fpm[12841]: [03-Mar-2018 15:31:52] ERROR: [/etc/php-fpm.d/www.conf:12] unknown entry '#listen'
Mar 03 15:31:52 instance-1 php-fpm[12841]: [03-Mar-2018 15:31:52] ERROR: Unable to include /etc/php-fpm.d/www.conf from /etc/php-fpm.conf at line 12
Mar 03 15:31:52 instance-1 php-fpm[12841]: [03-Mar-2018 15:31:52] ERROR: failed to load configuration file '/etc/php-fpm.conf'
Mar 03 15:31:52 instance-1 php-fpm[12841]: [03-Mar-2018 15:31:52] ERROR: FPM initialization failed
Mar 03 15:31:52 instance-1 systemd[1]: php-fpm.service: main process exited, code=exited, status=78/n/a
Mar 03 15:31:52 instance-1 systemd[1]: Failed to start The PHP FastCGI Process Manager.
Mar 03 15:31:52 instance-1 systemd[1]: Unit php-fpm.service entered failed state.
Mar 03 15:31:52 instance-1 systemd[1]: php-fpm.service failed.
How can I fix that?

PHP Thread compilation not working

I am attempting to use pthreads with Apache FPM.
Step 1.
After installing and recompiling php according to:
https://blog.programster.org/ubuntu16-04-compile-php-7-2-with-pthreads
The server works as expected and I can run pthreads from CLI.
Step 2.
Then I need to run threads from a web server so I followed the instructions from:
https://antrecu.com/blog/run-php7-fpm-apache-mpmevent-ubuntu-1604
After sudo service apache2 restart && sudo service php7.0-fpm restart:
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
$ systemctl status apache2.service
apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Mon 2018-03-12 17:09:45 PDT; 3min 35s ago
Docs: man:systemd-sysv-generator(8)
Process: 30818 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 32443 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Mar 12 17:09:45 ubuntu apache2[32443]: * The apache2 configtest failed.
Mar 12 17:09:45 ubuntu apache2[32443]: Output of config test was:
Mar 12 17:09:45 ubuntu apache2[32443]: [Mon Mar 12 17:09:45.084452 2018] [:crit] [pid 32454:tid 139629110323072]
Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You n.. (output cut off in SSH client)
Mar 12 17:09:45 ubuntu apache2[32443]: AH00013: Pre-configuration failed
Mar 12 17:09:45 ubuntu apache2[32443]: Action 'configtest' failed.
Mar 12 17:09:45 ubuntu apache2[32443]: The Apache error log may have more information.
Mar 12 17:09:45 ubuntu systemd[1]: apache2.service: Control process exited, code=exited status=1
Mar 12 17:09:45 ubuntu systemd[1]: Failed to start LSB: Apache2 web server.
Mar 12 17:09:45 ubuntu systemd[1]: apache2.service: Unit entered failed state.
Needless to say I am a newbie when it comes to compiling Linux packages.
Any suggestions?
I am attempting to use pthreads with Apache FPM.
You can't. Find a way to work without them.
The pthreads extension cannot be used in a web server environment. Threading in PHP is therefore restricted to CLI-based applications only.
-- http://php.net/manual/en/intro.pthreads.php

Categories