php-fpm开启报错-ERROR: An another FPM instance seems to already listen on /tmp/php-cgi.sock

简介: php-fpm开启报错-ERROR: An another FPM instance seems to already listen on /tmp/php-cgi.sock

在升级了php7.2.0版本之后,重新启动php-fpm过程中遇到一个报错。


An another FPM instance seems to already listen on /tmp/php-cgi.sock
# netstat -ant | grep 9000  //查看启动进程,发现没启动成功


我们去查看一下php-fpm.conf里面的配置:


vim  /usr/local/php/etc/php-fpm.conf  
[www]
listen = /tmp/php-cgi.sock   //注意
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www


此时我们需要根据配置文件的listen地址做对应的修改:


vim /usr/local/nginx/conf/nginx.conf
location ~ [^/]\.php(/|$) {
       fastcgi_pass unix:/tmp/php-cgi.sock;    //把127.0.0.1:9000改为此行
       fastcgi_index index.php;
       fastcgi_param SCRIPT_FILENAME     $document_root$fastcgi_script_name;
       include fastcgi_params;
}
location / {
      root   html;
      index index.php index.html index.htm;
}


修改完平滑重启nginx,然后启动php-fpm,OK


目录
相关文章
|
1月前
|
应用服务中间件 Shell PHP
pbootcms模板报错提示PHP Warning: Unknown: open_basedir restriction
pbootcms模板报错提示PHP Warning: Unknown: open_basedir restriction
|
3月前
|
PHP Windows
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
|
3月前
|
PHP
PHP——oneinstack重新安装PHP的时候报错
PHP——oneinstack重新安装PHP的时候报错
60 4
|
3月前
|
PHP
PHP——安装ThinkPHP框架报错
PHP——安装ThinkPHP框架报错
33 0
|
5月前
|
PHP
php 使用phpize报错Cannot find config.m4. Make sure that you run ‘/usr/bin/phpize‘ in the top l
php 使用phpize报错Cannot find config.m4. Make sure that you run ‘/usr/bin/phpize‘ in the top l
230 1
|
5月前
|
Ubuntu PHP
ubuntu php libzip安装 ./configure报错 checking for libzip... not found configure
ubuntu php libzip安装 ./configure报错 checking for libzip... not found configure
96 1
|
5月前
|
PHP 数据库
phpMyAdmin报错 in ./libraries/config/FormDisplay.php#661 continue targeting switch is equivalent to
phpMyAdmin报错 in ./libraries/config/FormDisplay.php#661 continue targeting switch is equivalent to
42 0
|
6月前
|
PHP
PHP显示报错提示,开启display_errors的方法
PHP显示报错提示,开启display_errors的方法
156 0
|
6月前
|
Java 中间件 Serverless
Serverless 应用引擎操作报错合集之在阿里函数计算中,云函数怎么一直报错Function instance exited unexpectedly(code 1, message:operation not permitted) with start command 'php server.php '.如何解决
Serverless 应用引擎(SAE)是阿里云提供的Serverless PaaS平台,支持Spring Cloud、Dubbo、HSF等主流微服务框架,简化应用的部署、运维和弹性伸缩。在使用SAE过程中,可能会遇到各种操作报错。以下是一些常见的报错情况及其可能的原因和解决方法。
148 2
|
6月前
|
应用服务中间件 Linux PHP
Linux下安装php环境并且配置Nginx支持php-fpm模块
Linux下安装php环境并且配置Nginx支持php-fpm模块
460 0