V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
xlinux
V2EX  ›  PHP

Thinkphp 3.2 无法使用 Memcache

  •  
  •   xlinux · 2017-12-19 17:29:40 +08:00 · 2875 次点击
    这是一个创建于 2290 天前的主题,其中的信息可能已经有所发展或是发生改变。

    1、服务器环境是 Lnmpa 2、php 版本是 5.5.38 3、memcached 服务已经启动的了。

    从 phpinfo 看到 memcache 已经是成功的了。但是运行 thinkphp 报系统不支持:memcache。 大佬们这是什么情况?

    9 条回复    2017-12-19 22:23:29 +08:00
    nosay
        1
    nosay  
       2017-12-19 17:52:12 +08:00   ❤️ 2
    你写一个原生的 php 代码调试一下,看看能不能使用 memcache
    然后再考虑把这口黑锅给 tp 背上
    kanganxi
        2
    kanganxi  
       2017-12-19 17:54:37 +08:00   ❤️ 1
    Thinkphp 3.2 表示不背这个锅,
    riggzh
        3
    riggzh  
       2017-12-19 17:55:08 +08:00   ❤️ 1
    memcached 和 memcache 是两个东西
    riggzh
        4
    riggzh  
       2017-12-19 17:57:58 +08:00   ❤️ 1
    刚才看茬行了,你访问下默认的 11211 看看能不能访问先
    ZXCDFGTYU
        5
    ZXCDFGTYU  
       2017-12-19 18:12:26 +08:00   ❤️ 1
    先自己写个脚本测试一下再考虑让 tp 背锅的事情
    xuchen
        6
    xuchen  
       2017-12-19 18:20:55 +08:00   ❤️ 1
    光有扩展没服务?服务起来了么?
    widdy
        7
    widdy  
       2017-12-19 18:42:12 +08:00   ❤️ 1
    php 有 memcached 和 memcache 这两个 memcache 扩展,如果服务启动了的话,说不定 tp 不支持 memcache 扩展 也有可能啊;
    xlinux
        8
    xlinux  
    OP
       2017-12-19 22:17:10 +08:00
    @nosay
    @kanganxi
    @riggzh
    @riggzh
    @ZXCDFGTYU
    @xuchen
    @widdy
    我的锅,已经解决了,谢谢各位。
    问题在于 memcached 和 memcache 是两个东西。
    http://blog.csdn.net/lein_wang/article/details/52756859
    littleylv
        9
    littleylv  
       2017-12-19 22:23:29 +08:00   ❤️ 1
    memcached 是服务进程,可以粗暴的认为是服务器
    php-memcahce & php-memcached 是 php 连接 memcache 的扩展,可以粗暴的认为是客户端
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5512 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 08:18 · PVG 16:18 · LAX 01:18 · JFK 04:18
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.