i try to treat a massive excel file (5500 row * 50 column) with PHP my code is correct i don't have any bug when i tried it for only 100 rows. but when i put the whole file, i have this fatal Error i tried to change the memory_limit to 256 instead of 128 but nothing happen is there any solution to process my hole file !

the error is : Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 24 bytes) in C:\wamp\www\zannier\Classes\PHPExcel\CachedObjectStorage\CacheBase.php on line 173 and my code is :

 <?php

    require_once ".\Classes\PHPExcel\IOFactory.php";

    $objPHPExcel = PHPExcel_IOFactory::load("zfg01_CAT.xls");


    $sheet = $objPHPExcel->getSheet(0);

   include 'fonctionsUtiles.php';
  // afficherUneFeuille($sheet);
   echo'<br>';
   echo $sheet->getHighestRow();
   echo'<br>';

   supprimerLesDoublons($sheet);
   afficherUneFeuille($sheet);
    echo $sheet->getHighestRow();
   echo'<br>';

    ?>

Thanks !

2

There are 2 answers

2
Rob G On

You need to bounce Apache for the changed setting to be picked up

0
Heitor On

Do it with caution: set memory_limit = -1 in php.ini file. Restart Apache.

Important for WAMP: it uses two php.ini file, the one when you click throught WAMP tray menu (works for apache when you open the script in the browser) and the other one inside WAMP's directory tree (something like C:\wamp64\bin\php\php5.6.25\php.ini) who works when you execute PHP in the command line.