beaaar
V2EX  ›  PHP

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

  •  
  •   beaaar · Dec 1, 2014 · 2720 views
    This topic created in 4209 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   ·   883 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 56ms · UTC 20:25 · PVG 04:25 · LAX 13:25 · JFK 16:25
    ♥ Do have faith in what you're doing.