⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Export List Issues



simricci
  • profile picture
  • Member

Posted 31 October 2017 - 14:25 PM

I am having problems with the Export List function in Grocery Crud Enterprise 2.3.6

I installed it successfully on two different environments (same code, except for the database.php of course)

The first one works completely fine, even when trying to generate an Excel Export on some table.

The second one works fine, until you try to Export a table in Excel format.

 

Here's the 2 http header I got when trying to export (?action=export)

 

Working page (first environment)


HTTP/1.1 200 OK => 
Server => nginx
Date => Tue, 31 Oct 2017 14:12:09 GMT
Content-Type => application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Connection => close
X-Powered-By => PleskLin
Content-Disposition => attachment;filename="Trees_2017-10-31.xlsx"
Expires => Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control => cache, must-revalidate
Pragma => public
Last-Modified => Tue, 31 Oct 2017 14:12:09 GMT

Not working page (second environment)

HTTP/1.0 500 Internal Server Error => 
Date => Tue, 31 Oct 2017 14:08:54 GMT
Server => Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/5.6.30
X-Powered-By => PHP/5.6.30
Content-Disposition => attachment;filename="Iscritti_2017-10-31.xlsx"
Cache-Control => cache, must-revalidate
Expires => Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified => Tue, 31 Oct 2017 14:08:54 GMT
Pragma => public
Content-Length => 0
Connection => close
Content-Type => application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

simricci
  • profile picture
  • Member

Posted 31 October 2017 - 14:49 PM

Adding more information, here's what i get into the excel file which is generated by the second environment:

 

Warning: ZipArchive::close(): Failure to create temporary file: No such file or directory in /data/www/PATH_TO_MY_SITE_HIDDEN_SINCE_IT_IS_PUBLIC/libraries/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007.php on line 398

Fatal error: Uncaught exception 'PHPExcel_Writer_Exception' with message 'Could not close zip file php://output.' in /data/www/PATH_TO_MY_SITE_HIDDEN_SINCE_IT_IS_PUBLIC/libraries/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007.php:399 Stack trace: #0

/data/www/PATH_TO_MY_SITE_HIDDEN_SINCE_IT_IS_PUBLIC/libraries/grocerycrud/enterprise/src/GroceryCrud/Core/State/ExportState.php(180): PHPExcel_Writer_Excel2007->save('php://output') #1 

/data/www/PATH_TO_MY_SITE_HIDDEN_SINCE_IT_IS_PUBLIC/libraries/grocerycrud/enterprise/src/GroceryCrud/Core/State/ExportState.php(98): GroceryCrud\Core\State\ExportState->exportToExcel(Array, Array) #2 /data/www/PATH_TO_MY_SITE_HIDDEN_SINCE_IT_IS_PUBLIC/libraries/grocerycrud/enterprise/src/GroceryCrud/Core/GroceryCrud.php(1840): GroceryCrud\Core\State\ExportState->render() #3 /data/www/PATH_TO_MY_SITE_HIDDEN_SINCE_IT_IS_PUBLIC/backoffice/iscrittiNL.php(36): GroceryCrud\Core\GroceryCrud->render() #4 {main} thrown in

/data/www/PATH_TO_MY_SITE_HIDDEN_SINCE_IT_IS_PUBLIC/libraries/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007.php on line 399