PHP Error says cache file not there, but it is.

Topics: User Forum
Oct 31, 2014 at 10:25 PM
PHP Version 5.5.12
PHPExcel 1.8.0

include_once 'includes/abidb_connect.php';
include_once 'includes/abi_functions.php';
require_once 'includes/SessionStart.php'; //$conn is set here
require_once 'Classes/PHPExcel.php';
ini_set("memory_limit","500M"); // set your memory limit in the case of memory problem

/* Caching to discISAM 1.0/
$cacheMethod = PHPExcel_CachedObjectStorageFactory:: cache_to_discISAM;
$cacheSettings = array( 'dir' => '../upload'); // If you have a large file you can cache it optional
PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings);

/ Get the data in $rows[] /

/* Create a new PHPExcel object 1.0 /
$objPHPExcel = new PHPExcel();

/* Loop through the result set 1.0 /
$rowNumber = 1; //start in cell 1
foreach ($rows as $row)
$col = 'A'; // start at column A
foreach($row as $cell)

results in:
Warning: unlink(../upload/PHPExcel.2256363825453fbf97901d7.14442298.cache): No such file or directory in C:\wamp\www\abitest\Classes\PHPExcel\CachedObjectStorage\DiscISAM.php on line 214

....yet the file is indeed there.

Also I was hoping to have this output an Excel file. Is the code complete to do that? If so will the user be prompted where to download to?

Line 14 does return many $rows, verified with print_r($row) at line inserted line after line 23.