Hello people!
I have faced the same bug that other people had reported before:Quote"Error! Not possible to create the zip file.
Please contact the Webmaster."
I have read this topics and there were no real solution:http://www.jdownloads.com/index.php/support-forum.html?topic=7480.0
http://www.jdownloads.com/index.php/support-forum.html?topic=7270.0
I have to debug Jdownloads and have found something interesting:Warning: ZipArchive::addFile(): Invalid or uninitialized Zip object in /public_html/components/com_jdownloads/helpers/jdownloadshelper.php on line 1964
Warning: ZipArchive::addFile(): Invalid or uninitialized Zip object in /public_html/components/com_jdownloads/helpers/jdownloadshelper.php on line 1964
Warning: ZipArchive::addFile(): Invalid or uninitialized Zip object in /public_html/components/com_jdownloads/helpers/jdownloadshelper.php on line 1964
Warning: ZipArchive::close(): Invalid or uninitialized Zip object in /public_html/components/com_jdownloads/helpers/jdownloadshelper.php on line 1968
Problematic code:$result = $zip->open($destination, $overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE);
It works only with php 5.5.x and, maybe, earlier.
My quick fix for this issue for PHP 5.6 is:$result = $zip->open($destination, ZipArchive::CREATE | ZipArchive::OVERWRITE);
Hi Alexander,
many thanks for the hints. Can you give me a link to your source?
Thank you Arno.
I have attached source file.
[gelöscht durch Administrator]
Quote from: Makulia on 17.11.2015 20:56:02
Thank you Arno.
I have attached source file.
Thanks for the file but i had meant the information source.
Quote
My quick fix for this issue for PHP 5.6 is:
$result = $zip->open($destination, ZipArchive::CREATE | ZipArchive::OVERWRITE);
I need an info whether this fix works for all php versions. ::)
I have tested fix for php 5.3.x, 5.4.x, 5.5.x, 5.6.x. Works with all versions.
Information source: http://php.net/manual/en/ziparchive.open.php
Okay, then i will fix it as you have described.
The bugfix is now a part from version 3.2.42 as i had forgotten to implement it in 3.2.41.
Sorry. ::)