V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
beaaar
V2EX  ›  PHP

配置 Session 储存在 Memcache 中, Session 始终无法存入 Memcache

  •  
  •   beaaar · Dec 1, 2014 · 2678 views
    This topic created in 4179 days ago, the information mentioned may be changed or developed.
    框架为Yii,php.ini中session相关配置已配好,开发环境win测试没问题,linux单机测试环境也没问题。唯独线上环境session无法写入memcache。
    在线上环境中,写session的方法中同时另外给memcache中set一个值,在其他方法中,可获取该值,但无法通过sessionid获取session。

    线上环境配置了负载均衡,本机改了hosts指定了一台服务器的IP,memcache服务器只有一台。

    难道只能自定义session类了么?
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3325 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 12:47 · PVG 20:47 · LAX 05:47 · JFK 08:47
    ♥ Do have faith in what you're doing.