PHP Excel

Spread the love

Errore in cui sono incorso provando la libreria PHPExcel:

marcob@jsbach:~$ tail -f  /var/log/apache2/error.log
[Thu Mar 31 16:40:26 2011] [error] [client 127.0.1.1] 
PHP Fatal error: Uncaught exception 'Exception' with message 
'Could not close zip file
/var/www/Classes/PHPExcel/Tests/01simple.xlsx.' in
/var/www/Classes/PHPExcel/Classes/PHPExcel/Writer/Excel2007.php:344
Stack trace:n#0 /var/www/Classes/PHPExcel/Tests/01simple.php(77):
PHPExcel_Writer_Excel2007->save('/var/www/Classe...')
#1 {main}
thrown in 
/var/www/Classes/PHPExcel/Classes/PHPExcel/Writer/Excel2007.php
on line 344

In sostanza non riesco a scrivere nella directory

/var/www/Classes/PHPExcel/Tests/

Soluzione:

root@jsbach:/var/www/Classes/PHPExcel# chmod 775 Tests/
root@jsbach:/var/www/Classes/PHPExcel# chgrp www-data Tests/

L’errore sparisce e il file viene salvato.

Lascia un commento

Your email address will not be published.