Memcache ile PHP garip sorun

2 Cevap php

PHP burada bazı memcache kodunu test ediyorum:

1:

$testInstance = new Memcache;
$var = @$testInstance->connect('localhost', 11211);
echo $var;
// Outputs true no matter if the memcached is running or not.

2:

$testInstance = new Memcache;
$var = @$testInstance->connect('blablabla', 11211);
echo $var;
// Outputs false

Why on earth is this occuring? I am running WinXP in my development environment and I cant see how the localhost version always returns true no matter if the memcached is running or not.

Teşekkürler!

2 Cevap

I yerine Ubuntu sunucu üzerinde memcached (değil memcache) çalıştırmak için açıldığında sorun gitti. Gerçekten garip ...

Eğer memcache localhost üzerinde çalışan olmadığından emin misin? Belki sistem hizmeti olarak arka planda yaşıyor? Bir şey koyun ve bunu alabilirsiniz görmek.