I am using PHP version 5.3.8 with PHPExcel version 1.7.6 on Windows Server 2003. When I try to load a .xlsx file I get this error:
Warning: ZipArchive::getFromName() [ziparchive.getfromname]: Invalid or unitialized Zip object in
C:\Inetpub\wwwroot\Library\PHPExcel\Reader\Excel2007.php on line
I have traced the problem down to line 369 in PHPExcel\Reader\Excel2007.php, where it says
$zip->open($pFilename); This is returning 11 instead of the expected TRUE. I think this means it can't open the zip archive.
At first I thought there was something wrong with the excel file, so I created a sample from scratch and used that, no luck.
The code I used:
$objReader = PHPExcel_IOFactory::createReader('Excel2007');
$objPHPExcel = $objReader->load($_FILES['report1']['tmp_name']);