通过lnmp安装了php7版本,但是发现与程序不兼容,需要降低到7.0以下的版本。
查找lnmp的install.sh文件,一般在/root/lnmp1.5/install.sh 下执行命令
sudo ./install.sh mphp
等待安装过程
安装结束
有多个php版本
5.在/usr/local/nginx/conf 下会多一个enable-php5.6.conf
需要修改nginx配置,找到include enable-php.conf; 修改为include enable-php5.6.conf;
重新启动sudo lnmp restart
8.停掉原版本的php
/etc/init.d/php-fpm {start|stop|quit|restart|reload|logrotate}
注意:
访问网页时可能会出现502错误,查看nginx的error.log发现如下日志:
2018/08/02 06:44:20 [crit] 11744#0: *46 connect() to unix:/tmp/php-cgi.sock failed (2: no such file or directory) while connecting to upstream, client: 114.244.134.66, server: tpshop.goldblockchain.org.cn, request: "get / http/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "tpshop.goldblockchain.org.cn"
需要nginx.conf 与php-fpm.conf 中关于/tmp/php-cgi.sock配置要统一,因为安装其他版本php,此sock名称会不同
如对本文有疑问, 点击进行留言回复!!
php 使用 yansongda/pay 进行微信,支付宝支付
Codeforces Round #658 (Div. 2) (C1、C2)
van-uploader + thinkphp6.0 图片上传
网友评论