的財產,我使用Yii PHP框架和memcache緩存,當我打開沒有緩存的頁面,第一次我看到這個錯誤:Yii的高速緩存錯誤:試圖讓非對象
現場錯誤錯誤註銷(Linux版):
Fatal error: Call to a member function getColumnNames() on a non-object in /home/cineshell/cineklik/framework/db/ar/CActiveFinder.php on line 385
,錯誤日誌本地(窗口):
Trying to get property of non-object
C:\xampp\htdocs\appfolder\framework\yiilite.php(7125)
...
7123 public function getTableSchema()
7124 {
7125 return $this->getMetaData()->tableSchema;
7126 }
配置/主:
'cache'=> array(
'class'=> 'CMemCache',
'servers'=>array(
array('host'=>'localhost', 'port'=>11211, 'weight'=>100),
),
),
緩存例如:
$data = Yii::app()->cache->get('casheID' );
if($data===false)
{
$data = dataprovider, query... etc
}
echo $data;
所以,這裏有什麼錯誤,並且可能是一些在服務器設置?
有人告訴我使用if isset
但我不明白!
你在緩存什麼? –
@Aktiiv dataprovider,查詢.. – Abudayah