【问题标题】:Error trying to use memcache is with php 5.5?php 5.5 尝试使用 memcache 时出错?
【发布时间】:2014-04-18 10:16:01
【问题描述】:

我正在尝试将 memcached 与 php 5.5 一起使用,可以吗?

我已经下载了php_memcache.dll 并将其放在php/ext/ 文件夹中,并且还在php.ini 中添加了一行新代码extension=php_memcache.dll。但是还是不行。

当我尝试拨打 $memcache = new Memcache; 时,会发生以下情况。

致命错误:在中找不到类“Memcache” C:\xampp\htdocs\rnd\memcache\index.php上线

【问题讨论】:

    标签: php xampp memcached


    【解决方案1】:

    您可以尝试创建一个 php_info 页面来检查模块是否已加载。

    info.php

    <?php phpinfo();?>
    

    参考:http://www.phpinfofile.com/

    我使用的是 PHP 5.5.9,memcache 工作正常。请注意,我使用的是 *nix 机器。

    memcache
    
    memcache support => enabled
    Active persistent connections => 0
    Version => 2.2.7
    Revision => $Revision: 327750 $
    
    Directive => Local Value => Master Value
    memcache.allow_failover => 1 => 1
    memcache.chunk_size => 8192 => 8192
    memcache.default_port => 11211 => 11211
    memcache.default_timeout_ms => 1000 => 1000
    memcache.hash_function => crc32 => crc32
    memcache.hash_strategy => standard => standard
    memcache.max_failover_attempts => 20 => 20
    

    【讨论】:

    猜你喜欢
    • 2013-06-17
    • 2023-03-08
    • 1970-01-01
    • 1970-01-01
    • 2014-02-24
    • 2015-06-24
    • 1970-01-01
    • 1970-01-01
    • 2017-07-18
    相关资源
    最近更新 更多