PHP的版本当前查看已经是7了,但是PHP-FPM输出还是显示系统自带的5.6.
请问如何切换一下php-fpm绑定的php版本呢?现在打开PHP页面就自动下载文件,不能解析。
【更新】
已经把PHP-FPM绑定到PHP7了,也重启了NGINX(reload了配置文件),PHP还是没有解析。
nginx配置中PHP部分
location ~ .php$ {
root /Volumes/Web/test;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_intercept_errors on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /usr/local/etc/nginx/fastcgi.conf;
}
PHP-FPMNGINX服务运行正常 , 端口也都在监听中。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
用 homebrew 安装吧, nginx 可以用 valet 代替, 如果什么都不想弄, 就用 mamp 吧
搞定了。。简直蠢死了。
nginx.conf里我绑定了2个端口,然而我只在其中一个配置里加入了PHP配置信息,另一个没写。