php 出现错误 324 (net::ERR_EMPTY_RESPONSE)。在 kohana 中使用 memcache 时
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6329462/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Getting Error 324 (net::ERR_EMPTY_RESPONSE). when using memcache in kohana
提问by gianebao
i'm getting this error when i try to use memcache using kohana. all i did was changed the hostname in the configuration file and used $cache = Cache::instance('memcache');
.
当我尝试使用 kohana 使用 memcache 时出现此错误。我所做的只是更改了配置文件中的主机名并使用了$cache = Cache::instance('memcache');
.
i can telnet my memcached servers so probably the problem is not there.
我可以远程登录我的 memcached 服务器,所以问题可能不存在。
any help?
有什么帮助吗?
采纳答案by samstheitroad
The error described is a Google Chrome error. This suggests that Kohana is not responding with anything, most likely because the error/exception handling is being suppressed. Check that PHP error_reporting
is on (E_ALL
is a good value).
所描述的错误是 Google Chrome 错误。这表明 Kohana 没有做出任何响应,很可能是因为错误/异常处理被抑制了。检查 PHPerror_reporting
是否已开启(E_ALL
是一个很好的值)。
If there still is no output, it could be that PHP is segfaulting during execution. If so you should be able to find out what is wrong in your web server logs if not the system log.
如果仍然没有输出,则可能是 PHP 在执行过程中出现了段错误。如果是这样,如果不是系统日志,您应该能够找出 Web 服务器日志中的错误。
My best guess is that php-memcache and/or the memcache library is not compiled correctly or has been corrupted.
我最好的猜测是 php-memcache 和/或 memcache 库未正确编译或已损坏。
回答by allella
When using a PHP framework like FuelPHP https://fuelphp.com/forums/topics/view/4256#11344
当使用像 FuelPHP 这样的 PHP 框架时 https://fuelphp.com/forums/topics/view/4256#11344
Problem
问题
- In Google Chrome "Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data."
- No PHP errors, due to Apache dying before anything is sent back to the browser
- In Apache logs, this not helpful message "Error [notice] child pid 19647 exit signal Segmentation fault (11)"
- 在谷歌浏览器中“错误 324 (net::ERR_EMPTY_RESPONSE):服务器关闭了连接而不发送任何数据。”
- 没有 PHP 错误,因为 Apache 在任何东西被发送回浏览器之前就死了
- 在 Apache 日志中,这条没有帮助的消息“Error [notice] child pid 19647 exit signal Segmentation fault (11)”
SolutionDouble check there is an opening php tag (duh!), or check for other silly, rookie syntax mistakes.
解决方案仔细检查是否有一个打开的 php 标签(废话!),或者检查其他愚蠢的新手语法错误。
回答by ken
Can't reproduced this problem in local as my local and server have different environment. This happened after setting the PDO
无法在本地重现此问题,因为我的本地和服务器具有不同的环境。这发生在设置 PDO 之后
$db = new PDO('mysql:host='.$host.';dbname='.$db_name, $user, $pass,
array( PDO::ATTR_PERSISTENT => true));
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
However after run an update for sudo apt-get install php5-mysqlnd
. Problem fixed. So this could be one of the things you can check if you have run out of idea where's the problem coming from.
但是在为sudo apt-get install php5-mysqlnd
. 问题已解决。因此,如果您不知道问题来自哪里,这可能是您可以检查的事情之一。