Error trying merge cells: Allocated Memory

Topics: Developer Forum, User Forum
Jul 8, 2011 at 4:14 PM

Good day to everyone, I have a problem trying to merge cells... The error is this:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 7 bytes) in /var/www/Tesla/Datos/Excel/Classes/PHPExcel/Cell.php on line 750

I search in google about this error and try to fix it with this PHP sentence:

ini_set("memory_limit","512M");

but not work... I changed the values in the php.ini, without any result...

This is the source code:

$rangos = Array ( [0] => 8 [1] => 13 );

 

$aux = $rangos;

for($j=0;$j<$repeticionesPorVariable;$j++){
    for($i = 1; $i < $totalopciones; $i++){
        $excel->getActiveSheet()->mergeCellsByColumnAndRow(($aux[($i - 1)] + 1), $posicionEnFila, $aux[$i], $posicionEnFila);
        $aux[($i-1)] = $aux[($i-1)] + count($rangos);
    }
}

 

Saludos...