Home  >  Article  >  Backend Development  >  php-fpm不工作,该如何处理

php-fpm不工作,该如何处理

WBOY
WBOYOriginal
2016-06-13 13:43:54939browse

php-fpm不工作
鼓捣 nginx1.14+php-5.3.10+Ubuntu 都几天依然没有成功
访问 localhost/phpinfo.php后:
  nginx的access.log有反应
  php的 /usr/local/php/var/log/www.acccess.log也有反应
 例如其中一条:127.0.0.1 - 09/Feb/2012:04:51:16 +0800- 200 /www/phpinfo.php 0.481 512 0.00% 文件路径是对的
但问题是页面没有显示,只是返回了HTTP信息,且是200 ok,而错误日志里并没有什么变化
我随后修改了代码,增加了一个sleep(10) 来看看程序有没有被执行,结果是没有执行,立即返回信息。然而就是有php的访问日志变化,这太让我想不明白了,既然PHP都有检测到访问,那为啥不执行

------解决方案--------------------
检查php的error_log,可能是你的phpinfo.php本身有什么问题,或者是权限问题。

如果是php-fpm不工作,nginx会报bad gate的。
------解决方案--------------------
简单执行下看正常否。看是不是你的代码有问题 。
------解决方案--------------------
可能是nginx1.14没有加载运行php的模块!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn