无法启动PHP 7.0 FastCGI流程管理器

时间:2016-06-28 15:06:55

标签: php ubuntu

我对php7有疑问 当我运行此命令时,我收到错误

  

sudo systemctl status php7.0-fpm.service

此输出:

   ● 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: failed (Result: exit-code) since سه<U+200C>شنبه 2016-06-28 17:58:08 IRDT; 4min 27s ago
     Docs: man:php-fpm7.0(8)
  Process: 14328 ExecStart=/usr/sbin/php-fpm7.0 --nodaemonize --fpm-config /etc/php/7.0/fpm/php-fpm.conf (code=exited, status=203/EXEC)
 Main PID: 14328 (code=exited, status=203/EXEC)

ژوئن 28 17:58:08 khonok158 systemd[1]: Starting The PHP 7.0 FastCGI Process Manager...
ژوئن 28 17:58:08 khonok158 systemd[1]: php7.0-fpm.service: Main process exited, code=exited, status=203/EXEC
ژوئن 28 17:58:08 khonok158 systemd[1]: Failed to start The PHP 7.0 FastCGI Process Manager.
ژوئن 28 17:58:08 khonok158 systemd[1]: php7.0-fpm.service: Unit entered failed state.
ژوئن 28 17:58:08 khonok158 systemd[1]: php7.0-fpm.service: Failed with result 'exit-code'.

4 个答案:

答案 0 :(得分:2)

您可能必须这样做

apt-get install --reinstall php
systemctl start php7.0-fpm
systemctl enable php7.0-fpm
systemctl restart apache2

对我来说有效。

root@micro:~# systemctl status php7.0-fpm.service
? 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 2018-11-27 06:46:40 CET; 1 weeks 1 days ago
     Docs: man:php-fpm7.0(8)
 Main PID: 508 (php-fpm7.0)
   Status: "Processes active: 0, idle: 2, Requests: 5736, slow: 0, Traffic: 0req/sec"
    Tasks: 3 (limit: 4915)
   CGroup: /system.slice/php7.0-fpm.service
           tq508 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
           tq755 php-fpm: pool www
           mq756 php-fpm: pool www

答案 1 :(得分:1)

就我而言,以前的php7.2-fpm配置会导致问题:

所以我删除了目录,然后重新安装即可解决问题。

(如果不是第一次,请在php fpm配置下进行备份)

sudo rm -rf /etc/php/7.2/fpm/

答案 2 :(得分:0)

我在 Fedora 33 上遇到了这个问题。我只是卸载了 php 和 httpd

sudo dnf remove httpd
sudo dnf remove php

sudo dnf install php
sudo dnf install http

这解决了我的问题

答案 3 :(得分:0)

我已将 PHP 版本从 7.1 升级到 7.3。 在启动 7.3 之前,我必须先杀死 7.1 正在运行的 PHP fpm 进程

从以下命令获取进程ID:

ps -ef | grep PHP

杀死进程:

kill -9 < pid >

启动 PHP:

/etc/init.d/php7.3-fpm start