douketangyouzh5219 2012-10-04 01:23
浏览 46

Memcached不在php中工作

I can't make memcache work. I followed this tutorial and when I try the example from the last part of the tutorial I don't get any output.

Here's the code from the tutorial.

$m = new Memcached();
$m->addServer('localhost', 11211);
$m->set('key', 'hello world');
var_dump($m->get('key'));

When I load it to my webpage I don't get any output. It says error. What's wrong with my server? I installed it correctly and checked my phpinfo and found it there. why can't I make it work?

UPDATE:

I'm using virtualbox.. and debian is my guest os. and everything is working in php it's just that i can't make it work for memcached

  • 写回答

1条回答 默认 最新

  • dongtui4038 2012-10-04 01:33
    关注

    Start memcached daemon in the terminal like so:

    memcached -vv -m64 -l127.0.0.1
    
    评论

报告相同问题?

悬赏问题

  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64