Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.4

Bug #18590 Impossible to work from IIS7
Submitted: 2011-06-06 21:10 UTC
From: hbossot Assigned: hbossot
Status: Closed Package: Spreadsheet_Excel_Writer (version 0.9.2)
PHP Version: 5.3.6 OS: Windows server 2008
Roadmaps: (Not assigned)    
Subscription  


 [2011-06-06 21:10 UTC] hbossot (Hubert Bossot)
Description: ------------ Hello, I could install Spreadsheet_Excel_Writer easily with Apache on several Windows, but on Windows server 2008 with IIS7 it has never worked. Actually, I've checked carefully my IIS7 configuration (FastCGI is enable), but every .xls which are generated are empty. Test script: --------------- C:\Sites\>pear install Spreadsheet_Excel_Writer PHP_PEAR_INSTALL_DIR is not set correctly. pearcmd.php could not be found there. Please fix it using your environment variable or modify the default value in pear.bat The current value is: C:\Sites\/PEAR C:\Sites\> Expected result: ---------------- The test file below writes one word in a base.xls file with Apache, but with IIS7 it doesn't: <?php error_reporting( E_ALL & ~E_NOTICE & ~E_DEPRECATED ); set_time_limit(300); set_include_path ("PEAR/"); include 'Spreadsheet/Excel/Writer.php'; $workbook = new Spreadsheet_Excel_Writer(); $workbook->setTempDir('./tempdoc'); $workbook->send('base.xls'); $worksheet = $workbook->addWorksheet(); $worksheet->write(1,2,'test'); $workbook->close(); $workbook->sendFile(); ?>

Comments

 [2011-06-07 18:42 UTC] hbossot (Hubert Bossot)
PS: I've replaced this path "C:\Sites\/PEAR" by a good one "C:\Sites\PEAR" in all the subdirectories without success too.
 [2011-06-08 19:49 UTC] hbossot (Hubert Bossot)
FInally I've solved the problem by replacing the old syntax: $workbook->send($File); by: $workbook->setTempDir('../Temp'); //The directory should exist $workbook->send($File); $workbook->close(); $workbook->sendFile();
 [2011-06-08 19:50 UTC] hbossot (Hubert Bossot)
-Status: Open +Status: Closed -Assigned To: +Assigned To: hbossot