PHP Fatal error: Uncaught exception 'Exception' with message 'Could not open /tmp/phpxltmpXmXmN7 for writing.'

Topics: Developer Forum, User Forum
Jan 21, 2011 at 8:40 AM

Hello,

 

I tried to download Excel2007 file from PHPExcel, but next errors happend.

 

PHP Fatal error: Uncaught exception 'Exception' with message 'Could not open /tmp/phpxltmpXmXmN7 for writing.'
in /var/www/xxxxx/Classes/PHPExcel/Writer/Excel2007.php:231
Stack trace:
#0 /var/www/xxxxx/xxxxx.php(xxx):
PHPExcel_Writer_Excel2007->save('php://output')
#1 {main}
thrown in /var/www/xxxxx/Classes/PHPExcel/Writer/Excel2007.php on line 231, referer: http://xxxxx/

 

There is /tmp/phpxltmpXmXmN7(0KB) file.

I have installed php_zip module.

PHP:5.2.17

PHPExcel:1.7.5

 

Why is this?

 

Thanks in advance for your help.

Jan 21, 2011 at 8:47 AM
Edited Jan 21, 2011 at 8:57 AM

Hello,

I resolved this problem.

The cause was Safe Mode setting.

I disabled Safe Mode, then it worked.

Thanks.

Coordinator
Jan 21, 2011 at 8:55 AM
On 21/01/2011 08:40, xri wrote:
> PHP Fatal error: Uncaught exception 'Exception' with message 'Could not open /tmp/phpxltmpXmXmN7 for writing.'
Normally occurs as an indicator of file permission problems, safe mode,
or if the file is already "open" (depending on filesystem locking
controls).