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" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to