memcache setServers() issue

hi,

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

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

thanks

pete

$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.

/Tommy

http://www.yiiframework.com/doc/api/1.1/CMemCache#setServers-detail


$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.

/Tommy