【问题标题】:php memcache works in the CLI onlyphp memcache 仅在 CLI 中工作
【发布时间】:2013-07-08 05:43:02
【问题描述】:
<?php 

$m = new Memcache;

在 CLI 中没有错误。

在浏览器中是:

[ Fatal Error ]: Class 'Memcache' not found

在文件 /etc/php5/apache2/php.ini 与 extension=memcache.so 一致

在文件 /etc/php5/cli/php.ini 中也与 extension=memcache.so 一致

Apache 已重新启动...

【问题讨论】:

  • 你使用某种自动加载器吗?试过 $m = new \Memcache; ?

标签: php browser memcached command-line-interface


【解决方案1】:

确定问题没有安装

apt-get install php5-memcache

apache重启后就可以了

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-08-21
    • 2013-08-16
    • 2012-11-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-24
    • 2010-12-12
    相关资源
    最近更新 更多