jorozco Posted October 14, 2014 Share Posted October 14, 2014 Hi Everybody! Under CentOs 6.5 and using php55 remi with PrestaShop 1.6 we are having problems when we try to export a theme or a module. I just double checked PS folder permissions and the php zip module installation. When we try to export a theme: An error occurred during the archive generation Any help is welcome.Thanks in advance. Link to comment Share on other sites More sharing options...
vekia Posted October 15, 2014 Share Posted October 15, 2014 When we try to export a theme: An error occurred during the archive generation adv. parameters > logs do you see there some more informations related to this "error" ? Link to comment Share on other sites More sharing options...
jorozco Posted October 15, 2014 Author Share Posted October 15, 2014 (edited) Hi Vekia! No, there are no related errors in advanced->log, neither in apache error.log for the vhost. Thanks! Edited October 15, 2014 by jorozco (see edit history) Link to comment Share on other sites More sharing options...
mattmn Posted November 3, 2014 Share Posted November 3, 2014 Did you find a solution? I am in the same boat, and I thought initially it might be due to the zip extension not enabled, but phpinfo() shows that it is enabled. Permissions also allow global write in the directory. 1 Link to comment Share on other sites More sharing options...
jorozco Posted November 3, 2014 Author Share Posted November 3, 2014 Did you find a solution? I am in the same boat, and I thought initially it might be due to the zip extension not enabled, but phpinfo() shows that it is enabled. Permissions also allow global write in the directory. Not yet mattmn! Link to comment Share on other sites More sharing options...
-=peter=- Posted December 13, 2014 Share Posted December 13, 2014 Hello, In AdminThemesController.php, try to modify 936 to: $zip->open(_PS_CACHE_DIR_.$zip_file_name, ZipArchive::CREATE | ZipArchive::OVERWRITE) here the diff is the ZipArchive::CREATE flag. Seems to be some change in the new php version. Regards 5 Link to comment Share on other sites More sharing options...
fedesib Posted December 18, 2014 Share Posted December 18, 2014 Thank you Peter, it worked for me! Best, Federica Hello, In AdminThemesController.php, try to modify 936 to: $zip->open(_PS_CACHE_DIR_.$zip_file_name, ZipArchive::CREATE | ZipArchive::OVERWRITE) here the diff is the ZipArchive::CREATE flag. Seems to be some change in the new php version. Regards Link to comment Share on other sites More sharing options...
wayann Posted January 23, 2015 Share Posted January 23, 2015 Hello, In AdminThemesController.php, try to modify 936 to: $zip->open(_PS_CACHE_DIR_.$zip_file_name, ZipArchive::CREATE | ZipArchive::OVERWRITE) here the diff is the ZipArchive::CREATE flag. Seems to be some change in the new php version. Regards hey thx Peter! I had same issue, as you say it's an issue introduced with the new php 5.6.x Link to comment Share on other sites More sharing options...
Mehrshad Zakerian Posted January 29, 2015 Share Posted January 29, 2015 Yep that's the solution. It worked for me too. Thanks Link to comment Share on other sites More sharing options...
timonovici Posted February 26, 2015 Share Posted February 26, 2015 (edited) I just stumbled across this problem today, and both the 1142 and 1176 lines needed the additional flag ( ZipArchive::CREATE ). I'm using Archlinux, PHP 5.6 and Prestashop 1.6.0.11; This stuff wasted me half a day, so maybe it helps somebody else. Edited February 26, 2015 by timonovici (see edit history) Link to comment Share on other sites More sharing options...
Erik De Martiis Posted March 4, 2015 Share Posted March 4, 2015 I'm using PS 1.6.0.13, PHP 5.6.2, and the -=peter=- modify is working for me. There's one thing (that is not so clear) that you have to know when exporting a theme. You CAN change the Theme Name, but you CAN'T change the Theme Directory name (also if you can). If you change the Theme Directory label, you'll obtain only an XML file exported. Regards Erik Link to comment Share on other sites More sharing options...
timonovici Posted March 4, 2015 Share Posted March 4, 2015 I still have problems on my machine, I always get 0 byte archives out. I'm not sure what the problem is, all logs are clean. I should probably use XDebug to see what the heck is going on there, but I found a easier way - I created a virtual machine with Ubuntu 14.0 and did a clean install of PrestaShop. The export works just fine now. Link to comment Share on other sites More sharing options...
Alphaloc Posted June 21, 2015 Share Posted June 21, 2015 I also had a 0 byte archive problem, seems it was due to filesystem permissions of the theme directory I was trying to export. Changing ownership of the theme directory to the user prestashop/webserver runs as fixed it. chown -R <webserver_user>:<webserver_user> <path_to_theme_to_export> Link to comment Share on other sites More sharing options...
pehetheo Posted July 4, 2016 Share Posted July 4, 2016 Tanks you @peter i work !! Link to comment Share on other sites More sharing options...
mpouliot34 Posted July 26, 2016 Share Posted July 26, 2016 Hello, In AdminThemesController.php, try to modify 936 to: $zip->open(_PS_CACHE_DIR_.$zip_file_name, ZipArchive::CREATE | ZipArchive::OVERWRITE) here the diff is the ZipArchive::CREATE flag. Seems to be some change in the new php version. Regards THANK YOU!!!! Worked for me as well :) Link to comment Share on other sites More sharing options...
Recommended Posts