我在本地(windows系统)开发的程序,运行正常,放到服务器上(Linux)后总提示如下错误,服务器上的yii依赖模块都已开启了,现在查不出哪里出的问题,而且出错的地方主要都是调用zii.widgets.grid.CGridView这个列表视图时
PHP Error
Invalid argument supplied for foreach()
/var/www/framework/web/CActiveDataProvider.php(159)
147         $data=$this->model->findAll($criteria);
148         $this->model->setDbCriteria($baseCriteria);  // restore original criteria
149         return $data;
150     }
151 
152     /**
153      * Fetches the data item keys from the persistent data storage.
154      * @return array list of data item keys.
155      */
156     protected function fetchKeys()
157     {
158         $keys=array();
159         foreach($this->getData() as $i=>$data)
160         {
161             $key=$this->keyAttribute===null ? $data->getPrimaryKey() : $data->{$this->keyAttribute};
162             $keys[$i]=is_array($key) ? implode(',',$key) : $key;
163         }
164         return $keys;
165     }
166 
167     /**
168      * Calculates the total number of data items.
169      * @return integer the total number of data items.
170      */
171     protected function calculateTotalItemCount()