memcache setServers() issue


im trying to init memcache in my code instead of configuring it within

for some reason i always get the same error message when i try to setServers(). any idea what im doing wrong?



$mem = new CMemCache;

$mem->useMemcached = false;

$mem->setServers(array(‘host’=>‘localhost’, ‘port’=>‘11211’, ‘weight’=>‘1’));

throw new CException(Yii::t(‘yii’,‘CMemCache server configuration must be an array.’));

Should be given as an array of server configurations. See example in API Reference.


$mem->setServers(array(array('host'=>'localhost', 'port'=>'11211', 'weight'=>'1')));

Side note: Something strange is going on with this forum software. It seems like it’s no longer possible to get a hint about editing already in progress (by the other persons nickname appearing in italics ). Rather the nickname seems to disappear completely while editing is taking place.