1

PHPEXCEL Fatal error: Allowed memory size of 134217728 bytes exhausted

../Classes/PHPExcel/CachedObjectStorage/PHPTemp.php on line 60

    header('Content-type: text/csv;charset='.$charset);
    header('Content-Disposition: attachment; filename="product_option.csv"');
    $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'CSV');
    $delimiter = $app->input->getString('delimiter',',');
    $objWriter->setDelimiter($delimiter);
    $objWriter->save('php://output');//,

and also tried

    $cacheMethod = PHPExcel_CachedObjectStorageFactory:: cache_to_phpTemp;
    $cacheSettings = array( ' memoryCacheSize ' => '20MB');
    PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings);

any help related to this PHPExcel library ?

Alagesan
  • 349
  • 1
  • 11
  • 1
    possibly duplicate of [this](http://stackoverflow.com/questions/5560053/phpexcel-allowed-memory-size-of-134217728-bytes-exhausted) – TIGER Nov 09 '16 at 10:24
  • i developed product export plugin, client use different server so each server can't set these setting any other way – Alagesan Nov 09 '16 at 10:24
  • in that post they said following setting i tried, $cacheMethod = PHPExcel_CachedObjectStorageFactory:: cache_to_phpTemp; $cacheSettings = array( ' memoryCacheSize ' => '20MB'); PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings); – Alagesan Nov 09 '16 at 10:26
  • You should try other caching mechanisms. Look at the link @Tiger mentioned. Or you can use other libraries; writing a CSV file should never cause an Out of Memory error :/ – Adrien Nov 10 '16 at 00:54

0 Answers0