Artikel Verzeechnes
Äre System kann net fannen php-fpm.service, et kënnen déi folgend Situatiounen sinn:
1. Check PHP-FPM Versioun
anescht Linux Verdeelung a PHP Versioun,php-fpm De Service Numm ass anescht. Préift éischt d'PHP Versioun:
php -v
Zum Beispill ass d'Ausgab:
PHP 8.1.2 (cli) (built: Jan 23 2022 09:47:36) ( NTS )
Erkläert datt Dir benotzt PHP 8.1, da kann de PHP-FPM Service sinn php8.1-fpm.
Dir kënnt de spezifesche FPM Prozess mat dem folgenden Kommando kucken:
ps aux | grep php-fpm
Wann d'Ausgab ähnlech ass wéi:
root 1234 0.0 0.1 123456 12345 ? Ss 12:34 0:00 php-fpm: master process (/etc/php/8.1/fpm/php-fpm.conf)
Dann ass Äre Service Numm php8.3-fpm.
probéieren:
sudo systemctl restart php8.3-fpm
📌 Klickt op de Link hei ënnendrënner fir direkt déi super einfach HestiaCP PHP Versiouns-Sichtechnik ze beherrschen! 👇👇

2. Fannt de PHP-FPM Servicenumm
Wann Dir net sécher sidd iwwer de PHP-FPM Servicenumm, kënnt Dir benotzen:
systemctl list-units --type=service | grep fpm
oder:
systemctl | grep php
Wann et zréck geet:
php7.4-fpm.service loaded active running The PHP 7.4 FastCGI Process Manager
Dëst bedeit datt Är PHP Versioun 7.4 ass.
sudo systemctl restart php7.4-fpm
3. Kuckt ob PHP-FPM installéiert ass
如果 systemctl Kann net fannen php-fpm, wat beweist datt PHP-FPM net installéiert ka ginn. Dir kënnt lafen:
dpkg -l | grep php
Wann net php-fpm Zesummenhang Packagen, installéieren et:
sudo apt update
sudo apt install php-fpm
Da probéiert nach eng Kéier:
sudo systemctl restart php-fpm
4. Manuell PHP-FPM starten
如果 systemctl Wann de Service nach ëmmer net fonnt gëtt, kënnt Dir et manuell starten:
sudo /usr/sbin/php-fpm
Da kontrolléiert de Fortschrëtt:
ps aux | grep php-fpm
Wann PHP-FPM gestart ass, awer systemctl Wann de Service nach ëmmer net fonnt gëtt, kënnt Dir eng Systemd Konfiguratiounsdatei erstellen:
sudo nano /etc/systemd/system/php-fpm.service
Add to:
[Unit]
Description=The PHP FastCGI Process Manager
After=network.target
[Service]
ExecStart=/usr/sbin/php-fpm
Restart=always
User=www-data
Group=www-data
[Install]
WantedBy=multi-user.target
Dann:
sudo systemctl daemon-reload
sudo systemctl enable php-fpm
sudo systemctl start php-fpm
Resumé
- Bestëmmt PHP Versioun (
php -v) - Benotzt de richtege Servicenumm (
php7.4-fpmËffphp8.1-fpmwaarden) - Kuckt ob PHP-FPM installéiert ass (
dpkg -l | grep php) - Manuell Start (
/usr/sbin/php-fpm) - Wann et kee Systemd Service gëtt, erstellt et manuell
Dir kënnt dës Methoden probéieren a kucken wéi eng Äre Problem léist! 💡
Hoffentlech ass den Artikel "🚨 PHP-FPM Restart Failed? Fix Unit php-fpm.service not found in 1 Minute", deen um Blog vum Chen Weiliang ( https://www.chenweiliang.com/ ) gedeelt gouf, Iech hëllefräich.
Deelt gären de Link vun dësem Artikel: https://www.chenweiliang.com/cwl-32493.html

