简体   繁体   English

无法在Apache工作时获取php-fpm?

[英]Cannot get php-fpm on apache working?

I want to install php-fpm for my server my server is running on Apache, PHP 5.3.20, Fastcgi 我想为我的服务器安装php-fpm我的服务器正在Apache,PHP 5.3.20,Fastcgi上运行

and I also install php-fpm, using yum install php-fpm 而且我还安装php-fpm,使用yum install php-fpm

but now I look at phpinfo page, the Server API still shows CGI/FastCGI instead of FPM/FastCGI but when I use ps -ef | 但是现在我看phpinfo页面,服务器API仍然显示CGI / FastCGI而不是FPM / FastCGI,但是当我使用ps -ef | grep php-fpm I can get 我可以得到grep php-fpm

    apache   30304 30303  0 08:08 ?        00:00:00 php-fpm: pool www
    apache   30305 30303  0 08:08 ?        00:00:00 php-fpm: pool www
    apache   30306 30303  0 08:08 ?        00:00:00 php-fpm: pool www
    apache   30307 30303  0 08:08 ?        00:00:00 php-fpm: pool www
    apache   30308 30303  0 08:08 ?        00:00:00 php-fpm: pool www
    root     30494 29917  0 08:32 pts/0    00:00:00 grep php-fpm

is my php-fpm working or not?? 我的php-fpm是否正常工作?

Since you decided to install PHP as a package, did you make certain to only install the FPM package and not the PHP package? 既然您决定将PHP作为软件包安装,您确定只安装FPM软件包而不安装PHP软件包吗? By having both installed this would cause this situation to happen. 如果同时安装了两者,则会导致这种情况的发生。 Most package managers split their PHP installations by ISAPI. 大多数软件包管理器通过ISAPI拆分其PHP安装。 If you have installed both, remove one of them and try again. 如果您同时安装了两者,请卸下其中之一,然后重试。 The your post it appears FPM is running, but your previous installation is probably causing it not to be picked up yet. 您显示FPM的帖子正在运行,但是您以前的安装可能导致它尚未被拾取。

I also have a GitHub Gist for configuration of PHP-FPM and Apache 2.4 (works with 2.2 too with minor apache configuration changes) -> https://gist.github.com/diemuzi/3849349 我也有一个用于配置PHP-FPM和Apache 2.4的GitHub Gist(也可以在2.2上进行一些改动,但对Apache进行了少量更改)-> https://gist.github.com/diemuzi/3849349

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM