this is my code, when i upload a file with more than 500kb in 100MB php_max_memory am getting Allowed memory size exhausted
public function runImport($file){
$errors = array();
$objPHPExcel = Config::getExcel($file);
foreach($objPHPExcel->getSheet(0)
->getRowIterator(2, $objPHPExcel->
getSheet(0)->
getHighestDataRow()) as $row ){
$i = 0;
$_data = array();
foreach($row->getCellIterator() as $cell ){
$i++;
if ($i > count($columns)) break;
array_push($_data,(string)$cell->getValue());
}
foreach ($_data as $item){
if ($item != null && $item != "" && strlen($item) > 0){
$jdata = new Jobsdata();
$jdata->jobId = $this->jobId;
$jdata->data = $_data;
$jdata->save();
break;
}
}
}
$this->save();
return $errors;
}