Excel_Spreadsheet_Writer not working in production

From: Date: Thu, 10 Jul 2008 17:17:46 +0000
Subject: Excel_Spreadsheet_Writer not working in production
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-29072@lists.php.net to get a copy of this message
Hi all, I've developed an application that uses the Excel_Spreadsheet_Writer to generate spreadsheets. This works perfectly with the site hosted on my dev machine, but when I do the same thing on the production site, I get a spreadsheet with nothing in it. The spreadsheet contains one worksheet with the same name as the spreadsheet, even though my code creates a worksheet with a different name. That one worksheet has no values in any cells. To simplify things as much as possible, I wrote a small script to generate a really simple spreadsheet, and again, it worked in dev, not in production. The script is included below. No errors appear in any logs. The HTTP headers returned look the same in both cases, except that the dev server returns a Content-Length header, but the prod server does not. The size of the response from dev is about 4K, from prod it's always 256. It almost looks as if the two lines in the script that create the worksheet and then write to the worksheet are just not getting executed. In fact, when I comment out those two lines on my dev machine, I get exactly the same behavior. I've done all kinds of digging around and trying various things, but I'm at a loss. Any help would be appreciated. My dev machine is: OS : Windows XP Pro Web: Apache 2.2.6 PHP: 5.2.3 The production environment is a shared hosting server: OS : Linux Web: Apache 1.3.41 PHP: 5.2.6 Thanks, Morley --- <?php error_reporting (E_ALL); require_once 'Spreadsheet/Excel/Writer.php'; // Creating a workbook $workbook = new Spreadsheet_Excel_Writer(); // Creating a worksheet $worksheet =& $workbook->addWorksheet('Results Sheet'); $worksheet->write(0, 0, 'TEST'); $workbook->send('results.xls'); $workbook->close();

« previous php.pear.general (#29072) next »