FirePHP 标头不适用于 nginx 和 FPM

发布于 2024-12-20 23:43:39 字数 710 浏览 3 评论 0原文

我安装了 FirePHP FireFox 扩展并且它似乎可以工作。我也拿了示例代码来测试,但没有得到回复。

<?php
require('FirePHPCore/fb.php');
ob_start();

$firephp = FirePHP::getInstance(true);
$var = array('i'=>10, 'j'=>20);
$firephp->log($var, 'Iterators');

我在 Firebug NET 选项卡中没有看到任何额外的标头 - 所以我想知道在使用 PHP FPM 或通过 Nginx 时是否有配置 FirePHP 的特殊说明。

PHP版本5.3.6-13ubuntu3.2

更新:服务器响应标头

Server      nginx/1.0.5
Date        Mon, 19 Dec 2011 19:12:16 GMT
Content-Type    text/html
Transfer-Encoding   chunked
Connection      keep-alive
X-Powered-By    PHP/5.3.6-13ubuntu3.3
Content-Encoding    gzip
Request Headersview source
Host        localhost

I have the FirePHP FireFox extionsion installed and it appears to be working. I also have take the sample code to test, but I am not getting a response.

<?php
require('FirePHPCore/fb.php');
ob_start();

$firephp = FirePHP::getInstance(true);
$var = array('i'=>10, 'j'=>20);
$firephp->log($var, 'Iterators');

I don't see any extra headers in the Firebug NET tab - so I'm wondering if there are special instructions for configuring FirePHP when using PHP FPM or through Nginx.

PHP Version 5.3.6-13ubuntu3.2

Update: Server Response Headers

Server      nginx/1.0.5
Date        Mon, 19 Dec 2011 19:12:16 GMT
Content-Type    text/html
Transfer-Encoding   chunked
Connection      keep-alive
X-Powered-By    PHP/5.3.6-13ubuntu3.3
Content-Encoding    gzip
Request Headersview source
Host        localhost

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

他夏了夏天 2024-12-27 23:43:39

您可以在此处找到 FirePHP 设置的故障排除说明: http://sourcemint .com/github.com/firephp/firephp/1/-docs/Troubleshooting

您需要确保 FirePHP 在请求标头中标识自身,这仅在启用 Firebug 控制台和网络面板时才会发生。

我假设 FirePHP 正在识别自己。

对于诸如 nginx 之类的代理,如果标头未按原样转发,则可能会出现问题。如果 FirePHP 在标头中发送太多数据,Nginx 将失败。此限制可以通过 nginx 配置增加。不过,对于您在示例中发送的少量数据来说,这不应该是问题。

无需查看 nginx 调试日志,您可以尝试 FirePHP 1.0 + DeveoperCompanion 发送辅助请求来获取数据,而不是发送标头中的所有数据。

You can find troubleshooting instructions for a FirePHP setup here: http://sourcemint.com/github.com/firephp/firephp/1/-docs/Troubleshooting

You need to make sure FirePHP identifies itself in the request headers which will only happen when the Firebug Console and Net panels are enabled.

I am assuming FirePHP is identifying itself.

With a proxy such as nginx involved problems may arise if headers are not being forwarded as-is. Nginx will fail if FirePHP sends too much data in the headers. This limit can be increased via nginx configuration. This should not be a problem with the little data you are sending in the example though.

Short from going through nginx debug logs you could try FirePHP 1.0 + DeveoperCompanion which sends a secondary request to fetch the data vs sending all data in headers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文