Hi,
i get the following error when i click on Build.
PHP Warning: ZipArchive::addFile(): Invalid or uninitialized Zip object in /var/www/webkonto1/public_html/eisradio/administrator/components/com_cobalt/models/pack.php on line 871
The Problem must be on line 426
$zipper->open($zip_filename, ZIPARCHIVE::OVERWRITE);
When i change to
$zipper->open($zip_filename, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE);
then everything seems to be fine. I've tested this code with PHP 5.5.25 and 5.6.9. Can you confirm this?
I don't know if above code is correct, maybe we have to test if file exists before like
if (file_exists($zip_filename)) {
$zipper->open($zip_filename, ZIPARCHIVE::OVERWRITE)
} else {
$zipper->open($zip_filename, ZIPARCHIVE::CREATE)
}
EDIT: Some more Information. On hosteurope webhosting package with PHP 5.3 and 5.4 your original code works just fine.
Hi, i get the following error when i click on Build.
The Problem must be on line 426
When i change to
then everything seems to be fine. I've tested this code with PHP 5.5.25 and 5.6.9. Can you confirm this?
I don't know if above code is correct, maybe we have to test if file exists before like
EDIT: Some more Information. On hosteurope webhosting package with PHP 5.3 and 5.4 your original code works just fine.