The automatic update from 1.1.3 to 1.1.4 worked on all of my blogs but one. It should have been updated but wasn’t. Instead it failed and I tried updating manually, only to get an error message saying „PCLZIP_ERR_BAD_FORMAT (-10) : Invalid archive structure“
This blog is installed on a different server than the others, but the OS, PHP version, and nginx version and configuration (including site configuration) are all the same. The error message gives the impression that there is something wrong with the downloaded archive.
Like most of my other blogs this one was a former WordPress installation until 4.9.10 and then „cross-dated“ to ClassicPress using the plugin. I can find no difference between these blogs, but I still might have missed something.
The only times we have seen this before are when the cURL extension for PHP is not installed. On Devuan this is probably the php-curl package.
This should fix it on Devuan (instructions for other operating systems may vary), but do let us know:
sudo apt-get install php-curl
restart your webserver - sudo /etc/init.d/apache2 restart
try the update again from within the dashboard, or wait for the site to retry it
The problem is not a corrupted zip file but an occasional error with the HTTP download library that is used when cURL is not available. More information here:
Thank you for the welcome – and the solution! I had expected a clearer error message to point out that a PHP module was missing. I think I forgot it after the upgrade from Devuan ASCII (PHP7.0) to Devuan Beowulf (PHP7.3). Again, thank you
If you look at the discussion on the pull request, we had previously considered leaving this alone until version 2, since it doesn’t seem to be a common issue. (Not all downloads suffer from this problem, even if cURL is not installed, because GitHub does not always send downoaded files in chunked mode.)
We haven’t seen more reports of this issue since then (December 2019), apart from yours.
I’m still undecided on what to do about this:
For every report we see, there are probably about 10 other users that see the same thing but don’t report it
On the other hand, the fix considered in that PR should work ok for the v1 branch, but it is an ugly hack and could have other side effects.
Perhaps adding a clearer error message as you suggest would be another option.
Hello James, it has happened to me too, I am afraid. Exactly the same error on Ubuntu. I will try installing php-curl on the server, and let you know what happens
As promised: an update. I updated Ubuntu. I installed php-curl. I restarted the server. At the end of all that the problem persisted. ANy attempt to update Classicpress resulted in PCLZIP_ERR_BAD_FORMAT (-10) : Invalid archive structure
In the end I downloaded the new version and uploaded it to the server manually using Filezilla. That worked a treat
This should have fixed the issue. I suspect you are using a version of PHP that is not the same as the system default. Are you using cPanel or a similar control panel software on this server?
Anyway, since there are more reports now, I will make sure this gets fixed in the upcoming 1.2.0 release.