The PHP7 version was installed through LNMP, but was found to be incompatible with the program and needed to be reduced to a version below 7.0.
- to find the install.sh file for LNMP, typically under/root/lnmp1.5/install.sh
- execute command
sudo./install.sh mphp
Waiting for the installation process
- installation ends
- has multiple versions of PHP
5. There will be one more/usr/local/nginx/conf under the enable-php5.6.conf
- need to modify Nginx configuration, Find include enable-php.conf; modified to include enable-php5.6.conf;
- Restart sudo lnmp restart
8. Disable the original version of PHP
/ETC/INIT.D/PHP-FPM {start|stop|quit|restart| Reload|logrotate}
Note:
- There may be a 502 error accessing the Web page, viewing nginx error.log found the following 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 Connect ing to upstream, client:114.244.134.66, server:tpshop.goldblockchain.org.cn, Request: "get/http/1.1", Upstream: "FASTC Gi://unix:/tmp/php-cgi.sock: ", Host:" tpshop.goldblockchain.org.cn "
Requires nginx.conf with php-fpm.conf about/tmp/php-cgi.sock configuration to be unified, because the sock name will be different if you install another version of PHP
LNMP installing multiple Versions of PHP