PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » File Formats » Spreadsheet_Excel_Writer » Bug #8745

Zero sized output excel file

Details

Submitted2006-09-20 14:08 UTC
Fromcidirome at hotmail dot com
StatusBogus
PackageSpreadsheet_Excel_Writer
PHP Version4.3.10
OS2.6.8-2-686-smp Debian
Roadmaps(Not assigned)

Comments

[2006-09-20 14:08 UTC] cidirome at hotmail dot com

Description:
------------
When I call any code to generate a .xls file it always return an empty file (0 bytes).

I was working ok, but it stoped working some time ago, I think it was when I made some plesk updates.

I is working ok in another server I have with PHP 5.

Usefull information:

PHP 4.3.10-16 (cli) (built: Aug 24 2005 20:25:01)

Server version: Apache/2.0.54
Server built: Sep 5 2005 11:15:09

mysql Ver 14.7 Distrib 4.1.11, for pc-linux-gnu (i386)

Test script:
---------------
Tested with provided example arte.php

Expected result:
----------------
The smily face.

Actual result:
--------------
Empty file (0 bytes)

[2006-10-05 00:10 UTC] cidirome at hotmail dot com

The problem was PHP was running in safe mode....

Lets wait that the programers re-code the package to let it work while php is in safe mode.

[2006-10-05 06:52 UTC] tuupola at php dot net

This not a bug but restrictions of safe_mode in PHP.safe_mode as the name implies restricts usage of several php functions. The functions in question regarding this problem are tempnam() and fopen()

http://www.php.net/manual/en/features.safe-mode.functions.php

You can either run without safe_mode or do something like following:

$workbook->setTempDir($AbsoluteServerPathToTheTempDir);

Make sure the directory is chmod 777