PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » File Formats » Spreadsheet_Excel_Writer » Bug #2623

bug in SAFE_MODE

Details

Submitted2004-10-26 15:13 UTC
Fromgolan at seznam dot cz
StatusBogus
PackageSpreadsheet_Excel_Writer
PHP Version4.3.9
OSLINUX
Roadmaps(Not assigned)

Comments

[2004-10-26 15:13 UTC] golan at seznam dot cz

Description:
------------
there is a bug in safe_mode
this object doesnt send data to client when save mode is enabled

it's due to using function tempnam in OLE/PPS/File.php

this function does'nt work correcly in safe mode

[2004-11-19 21:04 UTC] lukasl at ackleymedia dot com

I can verify that this package returns a 0 byte file when using it in safe mode.

[2004-11-20 20:37 UTC] lukasl at ackleymedia dot com

Well, my host (swiftwill.com) figured this bug out.

Turns out this is not a bug, but basically the restrictions of safe_mode in PHP.

This package tries to create a file in /tmp/ and based on some safe_mode restrictions, this is where it fails.

You can fix this by setting the temporary directory for the file using this function:

$workbook->setTempDir($AbsoluteServerPathToTheTempDir);

Make sure the directory is chmod 777

This worked for me.

[2006-04-17 15:10 UTC] fnjordy at gmail dot com

The script calling SpreadSheet_Excel_Writer() needs to have the Safe_mode gid and/or uid, chmod 777 is not sufficient.