php v和phpinfo mac,关于 macos 下 PHP -v 和 PHP -fpm -v 版本不同的问题

我使用了macos10.13系统,用phpbrew来管理多版本 php,系统自带的 php 版本是 7.1.16 ,我用 phpbrew 下载来 php5.6 的版本,然后我用命令phpbrew switch 5.6切换了 php 版本,然后在终端下输入命令php -v

输出结果为:

PHP 5.6.30 (cli) (built: May 14 2019 18:30:16)

Copyright (c) 1997-2016 The PHP Group

Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

输入命令php-fpm -v

输出结果为:

PHP 7.1.16 (fpm-fcgi) (built: Mar 31 2018 03:00:16)

Copyright (c) 1997-2018 The PHP Group

Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies

web 页面输出phpinfo()也是 7.1.16

9dabd426fb320c3f9adb6fc7edada01b.png

系统自带的php-fpm位置在/usr/sbin,我尝试把我下载的 php-fpm5.6 的替换到这里,页面就 404

nginx 报错为:

2019/05/15 18:35:48 [error] 3125#0: *51 kevent() reported that connect() failed (61: Connection refused) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1:82"

2019/05/15 18:35:48 [error] 3125#0: *51 open() "/usr/local/Cellar/nginx/1.15.12/html/50x.html" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1:82"

2019/05/15 18:35:48 [error] 3125#0: *51 kevent() reported that connect() failed (61: Connection refused) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1:82"

2019/05/15 18:35:48 [error] 3125#0: *51 open() "/usr/local/Cellar/nginx/1.15.12/html/50x.html" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1:82"

ailed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1:82"

2019/05/15 18:48:03 [error] 3125#0: *64 kevent() reported that connect() failed (61: Connection refused) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1:82"

2019/05/15 18:48:03 [error] 3125#0: *64 open() "/usr/local/Cellar/nginx/1.15.12/html/50x.html" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1:82"

html 解析的正常的,问题就出在 php-fpm,google 搜索两天也没解决,各位师傅可以帮我看看吗,我想让 php-fpm 变成 5.6 的

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值