脚本宝典收集整理的这篇文章主要介绍了调试php 7 Xdebug 2.4.0RC3 mac os时502 Bad Gateway,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
error "502 Bad Gateway"
/etc/PHP/7.0/FPM/PHP.ini
使用您喜欢的文本编辑器打开它,并使用所需的权限保存配置文件.
转到xdebug部分并检查是否已正确设置.在我的情况下,它看起来像下面.请注意,在您的情况下,xdebug.so的路径可能不同.
[Xdebug] zend_extension="/usr/lib/PHP/20151012/xdebug.so" xdebug.remote_enable=1 xdebug.remote_port=9000 xdebug.PRofiler_enable=1 xdebug.profiler_output_dir="\tmp" xdebug.idekey="PHPSTORM" xdebug.remote_autostart=1 xdebug.remote_host=192.168.10.10 xdebug.remote_mode=req xdebug.remote_connect_back=1 xdebug.max_nesting_level=200 xdebug.VAR_display_max_depth=1000 xdebug.var_display_max_children=256 xdebug.var_display_max_data=4096 ;this line below to prevent debug stop timeout request_terminate_timeout=600s
在PHP.ini中检查的另一件事是
@R_360_18@ = 600
我已经在几秒钟内设置它,以防止默认情况下停止调试会话,它设置为30秒
接下来你需要检查的是Nginx配置我已经添加到主Nginx.conf http部分那些行
http { Proxy_connect_timeout 600s; proxy_send_timeout 600s; fastcgi_read_timeout 600s; proxy_read_timeout 600s; fastcgi_buffers 8 16k; fastcgi_send_timeout 600s; fastcgi_buffer_size 32k; #other standard settings below...
我已添加它们以给我更多时间进行调试会话,因此它不会在600秒内停止.
毕竟编辑完毕.
重启PHP7.0-fpm和Nginx.
我不确定在Ubuntu中它是如何在MacOS中完成的,它是通过以下方式完成的:
sudo service PHP7.0-fpm reload sudo service PHP7.0-fpm restart sudo service Nginx reload sudo service Nginx restart
也许重新加载然后重新启动但是要保险是有点过分了:)
另请查看Nginx的error.LOG文件在Ubuntu中,它们被放在/ var / logs / Nginx /中有error.yourdomain.log转到最后一行,看看发生了什么.希望它会有所帮助.
以上是脚本宝典为你收集整理的调试php 7 Xdebug 2.4.0RC3 mac os时502 Bad Gateway全部内容,希望文章能够帮你解决调试php 7 Xdebug 2.4.0RC3 mac os时502 Bad Gateway所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。