【问题标题】:Memcached implementation in php rise errorphp上升错误中的Memcached实现
【发布时间】:2017-03-11 17:56:26
【问题描述】:

我是 php Memcached 的新手。我正在尝试为处理数千个请求的应用程序实现 memcached。但是在脚本上初始化 Memcached 类时,如下所示:

<?php 
error_reporting(E_ALL & ~E_NOTICE); 
$mc = new Memcached();

然后我收到以下错误:

致命错误:在第 4 行的 C:\xampp\htdocs\mamecache.php 中找不到类“Memcached”

我是这项技术的新手,为什么会得到这个,请告诉我?

【问题讨论】:

  • 你用的是windows还是linux?
  • 我使用的是 Windows 7

标签: php memcached


【解决方案1】:

你需要先为php安装memcached。

试试sudo apt-get install mysql-server php5-mysql php5 php5-memcached memcached

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-memcache-on-ubuntu-14-04

【讨论】:

【解决方案2】:

可能你没有在你的电脑上安装 memcached 这就是你得到错误的原因。

请查看以下帖子:

HOW TO: Install Memcache on XAMPP (Windows 7/8/10)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-01-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-08
    • 1970-01-01
    相关资源
    最近更新 更多