I am attempting to import a csv using PHPExcel into my application so that I can load the data into a table. When the file reaches 2 meg+ the code fails.
I'm running Laravel on WAMP64. The code that is failing is:
$objPHPExcel = PHPExcel_IOFactory::load(Input::file('file')->getRealPath());
The error message is:
ErrorException: file_get_contents(C:\wamp\www\imax\public): failed to open stream: Permission denied in C:\wamp\www\imax\vendor\phpoffice\phpexcel\Classes\PHPExcel\Shared\OLERead.php:85
I know it's a size issue because the code completes properly when the file is 2048K. I can add one character to the file pushing it to 2049K and it fails. So it's not a permissions issue.
The line that fails in OLERead.php is:
// Get the file identifier
// Don't bother reading the whole file until we know it's a valid OLE file
$this->data = file_get_contents($sFileName, FALSE, NULL, 0, 8);
Wampserver 3.0.6
PHP 7.0.10