Re: PEAR Spreadsheet_excel_writer problem

From: Date: Tue, 03 Aug 2004 10:23:39 +0000
Subject: Re: PEAR Spreadsheet_excel_writer problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-192528@lists.php.net to get a copy of this message
Hmm.. I just did some more playing, and I solved the problem for me! It seems that the program did not have write permission to the temp folder because I was running in safe mode (I found this out by enabling all error messages with 'error_reporting (E_ALL);'. After I redirected the temp folder to a place that apache could write to, everything started working. Here's the final working code: $workbook = new Spreadsheet_Excel_Writer(); $workbook->setTempDir('/apache_tmp/'); $workbook->send('test.xls'); $worksheet =& $workbook->addWorksheet('Testsheet'); $worksheet->write(0, 0, 'Blah'); $workbook->close(); The Problem was solved by Ben Claar and I would like to thank him for his help in this matter. Alex Adido Solutions Ltd "Alex Othold" <alex@adido-solutions.com> wrote in message news:20040728132849.21112.qmail@pb1.pair.com... > Hi > > I have a class the utilizes the excel writer package but I'm having a few > problems with it on my production server. > > My development server is a Windows XP Pro box running PHP version 4.3.5. On > this box I dont get any problems and my class generates a valid excel > document. > > My production server is a FreeBSD box running PHP version 4.3.4. With this > box my class will create a excel document but when I go to open the file up, > it comes back and tells me the file is unreadable as it is 0 bytes in size. > > I know the sql query I'm running is returning data as I can create a tabbed > delimited excel document from it. > > Can anyone help me with this or point me in the right direction, as its > driving me mad. > > Thanks > > Alex

« previous php.general (#192528) next »