Memery problem

Hi I’m trying to make a simple CActiveModel::findAll:




$conflicts=$this->model()->findAll("position>{$oldPos} AND 

   position<={$this->position}",array('order'=>'position'));



I’m only supposed to get 1-4tuples, but I get a wierd php error:




Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 50 bytes) in /var/www/yii-1.0.9.r1396/framework/db/ar/CActiveRecord.php on line 1868



I’m a bit confused here it tries to allocate 50 bytes and the memory size is of 16M?

Any help would be appreciated

/DNRN

Sry I meen the CAcriveRecord…

But I have found it isn’t the problem!

I get the right object, but the next I do is to raise each position with 1 in a foreach loop:




foreach($conflicts as $key=>$conflict) {

   // raise each conflict's position by 1

   $conflict->position=$conflict->position+1;

   $conflict->save();

}



And it’s in this loop I get the memory_limit error…

Maybe this help to figure out where the problem is?

This is not a problem. The limit 16MB is probably a bit small, depending on how many PHP extensions you have enabled.