Getting Error 324 (net::ERR_EMPTY_RESPONSE). when using memcache in kohana

拈花ヽ惹草 提交于 2019-12-19 19:44:39

问题


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');.

i can telnet my memcached servers so probably the problem is not there.

any help?


回答1:


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).

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.

My best guess is that php-memcache and/or the memcache library is not compiled correctly or has been corrupted.




回答2:


When using a PHP framework like FuelPHP 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)"

Solution Double check there is an opening php tag (duh!), or check for other silly, rookie syntax mistakes.




回答3:


Can't reproduced this problem in local as my local and server have different environment. This happened after setting the 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.



来源:https://stackoverflow.com/questions/6329462/getting-error-324-neterr-empty-response-when-using-memcache-in-kohana

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!