Can not safe the xls file

Topics: User Forum
Feb 20, 2009 at 10:13 AM
Hi,

I have set the write permission for the IUSR and IWAM users to the C:\Temp map but the file is not saved.
When i use thesame code on localhost then it's works.

$objWriter = PHPExcel_IOFactory::createWriter($oXls, 'Excel5' ); 
$objWriter->save("C:\\Temp\\Test.xls"); 



Any idea ?

Thanks,
Jan
Developer
Feb 20, 2009 at 10:20 AM
Are you getting any error messages? Try using this at the beginning of your script:

error_reporting(E_ALL);
ini_set('display_errors', '1');

Feb 20, 2009 at 10:40 AM
Yes, Class ZipArchive not found and the php_zip extension in php.ini is enabled. Strange.
Developer
Feb 20, 2009 at 11:18 AM
Make sure server allows this test script to run with no error messages:

<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');

$zipArchive = new ZipArchive;
?>
Feb 20, 2009 at 12:27 PM
The DLL is also in the good directory so verry strange.

Fatal error: Class 'ZipArchive' not found in C:\Inetpub\wwwroot\shop\test.php on line 6

Feb 21, 2009 at 10:11 AM
I have moved the php.ini file from the windows directory to the php directory and the problem is solved. It is a w2003 server.
But now I get this error:
Fatal error: Allowed memory size of 10485760 bytes exhausted (tried to allocate 16 bytes) in C:\Inetpub\wwwroot\php\PEAR\Classes\PHPExcel\Writer\Excel5\Workbook.php on line 1449

Is this a setting in the php.ini ?

Thanks,
Jan

Feb 21, 2009 at 10:38 AM
Solved.
I found it in the php.ini.

Thanks,
Jan