Hi,
Please can you provide a link to your log file for the problematic backup? (You can download it from the “Existing Backups” tab of your UpdraftPlus settings page).
It’ll be too long to paste into the forum here, but you can download it to your computer, and share it with Dropbox, or paste it in pastebin.com, or any similar service, and post the link here.
Best wishes,
David
I appreciate the effort! The logs can be download at http://www.krav-maga.nu/updraft-log.zip
BR
Lars
Hi,
Yes, sorry to be slow. I did analyse the problem and it is caused by the PclZip engine that is bundled with WordPress not being able to handle non-ASCII characters. This zip engine is the third choice – UpdraftPlus prefers /usr/bin/zip, and then ZipArchive (part of PHP), but your webserver has neither of those.
However, it seems that a PHP snippet can be written to correctly unpack zip files created by PclZip, translating them back to UTF8. I was going to test this and send you the snippet. I have not had time yet – I will need to reply to you again later in the week.
Though, if you can update your PHP install (PHP 5.2.4 is the oldest one supported by WordPress, and has very many security issues – even PHP 5.4 is being end-of-lifed by the PHP group in a few days time – http://php.net/supported-versions.php ), or at least install the PHP ZipArchive module, then the problem will go away.
David
Thanks!
However, I am currently using PHP 5.4.42 and still have the same problem. I have asked my hosting provider to install ZipArchive, but they will not do that.
BR
Lars
Hi,
The code below works for me. To use it, you’ll need to 1) edit the value of $zipfile near the top and 2) copy the zipfile and a copy of wp-admin/includes/class-pclzip.php into the directory together with the script, and then 3) run the script directly (i.e. run it through your PHP binary).
<?php
$zipfile = 'backup_2015-09-03-1444_Empty_WordPress_b2180840b77e-others.zip';
require('class-pclzip.php');
$zip = new PclZip($zipfile);
if (!function_exists('zipPreExtractCallBack')) {
function zipPreExtractCallBack($p_event, &$p_header) {
$info = pathinfo($p_header['filename']);
$only_these_extensions = array('jpeg', 'jpg', 'gif', 'png');
// limit the unzipped images
if (1 || in_array($info['extension'], $only_these_extensions)) {
$get_host_iconv_encode = iconv_get_encoding("internal_encoding");
$get_file_mb_encode = mb_detect_encoding( $info['basename'] );
$p_header['filename'] = iconv( $get_host_iconv_encode , $get_file_mb_encode.'//TRANSLIT//IGNORE' , $p_header['filename'] );
return 1;
}
// other file extension will not be unzipped
else return 0;
}
}
$extract = $zip->extract(PCLZIP_OPT_PATH, 'unzipped', PCLZIP_CB_PRE_EXTRACT, 'zipPreExtractCallBack');
if ( $extract == 0 ) {
echo "Error : ".$zip->errorInfo(TRUE)."\n";
} else {
echo "OK\n";
}
David
Thanks! I’ll give it a try.