php - Memcached Message Error -


i'm using caching methods website, first :

apache configuration:

listen 127.0.0.1:11211 

php.ini configuration

extension=php_memcache.dll 

i think right, when trying simple caching code :

$cache=new memcache(); $cache->connect('127.0.0.1',11211); $cache->set('mykey','hello world');   echo $cache->get('mykey'); 

it sends me message error :

notice: memcache::set() [memcache.set]: server 127.0.0.1 (tcp 11211) failed with: failed reading line stream (0) on line 20 ,

keep in mind line 20 $cache->set('mykey','hello world'), means : it's connected through port 11211.

if critical bug in memcache library, mention i'm working on windows server , , i'd have "memcached" working on windows platform instead of memcache.

thank in advance.

try using

$cache->add('mykey','hello world'); 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -