G
G
goaad2020-04-13 23:17:42
opencart
goaad, 2020-04-13 23:17:42

Export/Import Opencart 3.0.2.0 error Could not close zip file php://output how to fix?

Good day, dear ones. When exporting XLSX file data, it gives an error Could not close zip file php://output. The error log shows the following:

2020-04-13 10:22:30 - PHP Warning: realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/ivaniv01/data:.) in /var/www/ivaniv01/data/www/waxmarket.pp.ua/system/library/export_import /Classes/PHPExcel/Shared/File.php on line 178
2020-04-13 10:22:30 - PHP Warning: tempnam(): open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/ivaniv01/data:.) in /var/www/ivaniv01/data/www/waxmarket.pp.ua/system/library/export_import/Classes /PHPExcel/Writer/Excel2007.php on line 190
2020-04-13 10:22:31 - PHP Warning: ZipArchive::close(): Failure to create temporary file: No such file or directory in /var/www/ivaniv01/data/www/waxmarket.pp.ua/ system/library/export_import/Classes/PHPExcel/Writer/Excel2007.php on line 388
2020-04-13 10:22:31 - PHP PHPExcel_Writer_Exception: Could not close zip file php://output. in /var/www/ivaniv01/data/www/waxmarket.pp.ua/system/library/export_import/Classes/PHPExcel/Writer/Excel2007.php on line 389

Changed line 178 in File.php to return "/var/ www/ivaniv01/data/mod-tmp"; was return realpath(sys_get_temp_dir()); - did not help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oldsy, 2021-04-12
@Oldsy

Try to remove mod-tmp, like this
"return "/var/www/ivaniv01/data/".sys_get_temp_dir();"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question