调试php 7 Xdebug 2.4.0RC3 mac os时502 Bad Gateway
我正在使用最新版本的
PHP(7.0.2)和xdebug(2.4.0RC3)与phpstorm 9.0.2,当我开始调试时,我立即得到了
error "502 Bad Gateway" 有时我会设法通过几行代码,但无论如何我都会得到错误. 当我有以前版本的PHP(5.6)和xdebug时,一切都很棒. 附: php,nginx和xdebug都是用自制软件安装的. 解决方法
你可以试试这个:
打开你的php.ini,对不起,我不知道它放在MacOS的哪个地方,在Ubuntu它已经打开了 /etc/php/7.0/fpm/php.ini 使用您喜欢的文本编辑器打开它,并使用所需的权限保存配置文件. [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中检查的另一件事是 max_execution_time = 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秒内停止. 毕竟编辑完毕. 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转到最后一行,看看发生了什么.希望它会有所帮助. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |