• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Resolved Error when adding a PHP Handler for PHP 7.0

solarweb

New Pleskian
Server operating system version
Ubuntu 20.04.6
Plesk version and microupdate number
Plesk Obsidian 18.0.53
Hello Everybody,

I got an error when I try to add a PHP handler for PHP 7.0 FPM.

I already did it on the same server for PHP 5.6 fpm and it worked well.

- Plesk Obsidian 18.0.53
- Ubuntu 20.04.6

My command :
/usr/local/psa/bin/php_handler --add -displayname php7.0-fpm -path /usr/sbin/php-fpm7.0 -phpini /etc/php/7.0/fpm/php.ini -clipath /usr/bin/php7.0 -type fpm -service php7.0-fpm -poold /etc/php/7.0/fpm/pool.d/ -id php7.0-fpm

The error :
Unable to register the PHP handler: php7.0-fpm: service not found.

I already verified all path, and it's working ok.

And the service seems ok too :
"service php7.0-fpm status" :

● php7.0-fpm.service - The PHP 7.0 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2023-07-18 09:34:18 CEST; 21min ago
Docs: man:php-fpm7.0(8)
Main PID: 1057 (php-fpm7.0)
Status: "Processes active: 0, idle: 3, Requests: 0, slow: 0, Traffic: 0req/sec"
Tasks: 4 (limit: 38309)
Memory: 33.6M
CGroup: /system.slice/php7.0-fpm.service
├─1057 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
├─1062 php-fpm: pool www
├─1063 php-fpm: pool www
└─1568 php-fpm: pool www

Jul 18 09:34:17 ns3082325 systemd[1]: Starting The PHP 7.0 FastCGI Process Manager...
Jul 18 09:34:18 ns3082325 systemd[1]: Started The PHP 7.0 FastCGI Process Manager.

So I don't find the error and I am blocked :(

Thanks for your help !
 
It could be a known product issue PPPM-14054, yet only known for Ubuntu 22 though. Could you please verify

1) that the service exists
# systemctl list-units | grep php7.0
should output this or something very similar:
php7.0-fpm.service loaded active running The PHP 7.0 FastCGI Process Manager

2) that the service file is present and has correct permissions
# ls -lah1 /lib/systemd/system | grep php
should output this (with a different timestamp):
-rw-r--r-- 1 root root 523 Jun 8 15:18 php7.0-fpm.service

If and only if these are both verified, you can try this workaround:

1) Rename the PHP7.0 service file:
# mv /lib/systemd/system/php7.0-fpm.service /lib/systemd/system/php70fpm.service

2) Stop and disable old service:
# systemctl disable php7.0-fpm && systemctl stop php7.0-fpm

3) Start and enable service under new name:
# systemctl enable php70fpm && systemctl start php70fpm

4) Register the PHP 7.0 FPM in Plesk:
# plesk bin php_handler --add -id php70-fpm-custom -displayname "PHP-FPM 7.0" -path /usr/sbin/php-fpm7.0 -phpini /etc/php/7.0/fpm/php.ini -type fpm -clipath /usr/bin/php7.0 -service php70fpm -poold /etc/php/7.0/fpm/pool.d/
 
Thank you for letting us know. The issue is planned to be fixed in the next release 18.0.54, which is currently being rolled-out.
 
Back
Top