PHP memcached session not working

我怕爱的太早我们不能终老 提交于 2019-12-24 14:04:00

问题


I started to use memcached for storing session files, but Session doesn't work and apache sends response too slow. How can I solve the problem?

Modifications in php.in are:

;session.save_handler = files
session.save_handler = memcached
session.save_path = "tcp://127.0.0.1:11211?persistent=1&weight=1&timeout=1&retry_interval=15"

回答1:


I solved the problem, Solution is connection url without tcp:// ,so session.save_path should be

session.save_path = "127.0.0.1:11211?persistent=1&weight=1&timeout=1&retry_interval=15"



回答2:


read this page:
http://www.php.net/manual/en/memcached.sessions.php
you should modify php.ini like that

session.save_handler = memcached 


Change memcached to memcache
Maybe Helpful for you
Else
That Check For Server Permissions And Check For Charset of Your PHP script And
Put this code:
in being:

<?php
ob_start ();
?>


at the end:

<?php
ob_flush ();
?>




来源:https://stackoverflow.com/questions/21215323/php-memcached-session-not-working

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