先执行 yum list installed|grep php查看安装的php
然后执行 rpm -e php-common.x86_64 删除掉所有php包
添加 最新的源:rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
再安装php:yum install –enablerepo=remi –enablerepo=remi-php56 php php-cli php-common php-devel php-fpm php-gd php-imap php-ldap php-mbstring php-mcrypt php-pecl-apc php-mysqlnd php-mysql php-odbc php-pdo php-gd php-mcrypt php-pear php-pecl-igbinary php-xml php-xmlrpc
但是重启/etc/init.d/php-fpm start时一直 ……….. failed
查看错误日志也正常,但就是一直卡住,然后检查/etc/init.d/php-fpm中pid配置和/etc/php-fpm.conf中的pid配置不一致导致,最终解决
但是nginx一直502,查看错误,[error] 29130#0: *5 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 103.1.19.9, server: xx.com, request: “GET / HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”
但php-fpm没有错误日志,执行php-fpm -t /etc/php-fpm.conf 也正常,需要配置/etc/php-fpm.d/www.conf 中 catch_workers_output=yes
再看错误日志:
WARNING: [pool www] child 29310 said into stderr: “ERROR: Unable to set php_value ‘soap.wsdl_cache_dir'”
不知道什么错误,解决办法,安装 php-soap
再看错误:WARNING: [pool www] child 29362 said into stderr: “ERROR: Connection disallowed: IP address ‘10.15.205.11’ has been dropped.”
解决办法,在/etc/php-fpm.d/www.conf修改listen.allowed_clients = 127.0.0.1,10.15.205.11解决