PHP运行出现502是什么原因,执行`phpinfo();`报错502,这是什么问题

代码如下,web访问后502:

phpinfo();

将代码改为phpinfo之外的任意函数,可以执行

echo time();

环境:

osX 10.12.3

Homebrew 1.1.9

nginx/1.10.2

PHP 7.1.1

PHP 7.1.1 (cli) (built: Jan 31 2017 21:43:52) ( NTS DEBUG )

Copyright (c) 1997-2017 The PHP Group

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

with Xdebug v2.5.0, Copyright (c) 2002-2016, by Derick Rethans

命令行中可以执行:

php -i

检查过php.ini,没有禁止执行的函数(是空的)

disable_functions =

能检测到phpinfo函数,但是不能执行

var_dump(function_exists('phpinfo')); // print true

nginx error log 如下:

*246 upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1, server: test4.cc, request: "GET /ini.php?a=22e243423 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "test4.cc"

请问怎么破?

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值