pete123  
          
              
                April 21, 2011,  3:43pm
               
              1 
           
         
        
          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.’));
         
        
           
         
            
       
      
        
          
          
            tri  
          
              
                April 21, 2011,  3:53pm
               
              2 
           
         
        
          
 pete123:
 
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
         
        
           
         
            
       
      
        
          
          
            Y11  
          
              
                April 21, 2011,  3:53pm
               
              3 
           
         
        
          http://www.yiiframework.com/doc/api/1.1/CMemCache#setServers-detail 
$mem->setServers(array(array('host'=>'localhost', 'port'=>'11211', 'weight'=>'1')));
 
        
           
         
            
       
      
        
          
          
            tri  
          
              
                April 21, 2011,  4:02pm
               
              4 
           
         
        
          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