Any bady help me or know this eror for install add on onli direct from add functionality? he following errors occurred when attempting to process your request: There was an error unpacking your file. Perhaps you have not uploaded a valid zip file, or you do not have zip installed.

Permalink
he following errors occurred when attempting to process your request:

There was an error unpacking your file. Perhaps you have not uploaded a valid zip file, or you do not have zip installed.


I have this Eror any bandy have knowledge to help me?
Thanks

 
nteaviation replied on at Permalink Reply
nteaviation
If I understand correctly, you are trying to install an add-on from the "dashboard/add functionality". I am also assuming that you have tried multiple times to install this add-on package. Which add-on are you trying to install? Do you (or your web host provider) have the zip executable installed on your server?
jordanlev replied on at Permalink Reply
jordanlev
It's an issue on your server. Either "unzip" isn't installed or your version of php doesn't support it, or there was some specific version of PHP which had a bug with this functionality (can't find the old post about that, though). I would contact your web host's tech support and ask them if they know about this (just tell them "my web application cannot unzip files on the server" -- this is not specific to Concrete5).
ffcato replied on at Permalink Reply
Ok i have the same problem and using network solutions for my host can anyone help me with this??? thanks, Josh cato@josh.com
jordanlev replied on at Permalink Reply
jordanlev
Did you contact your web host's tech support and ask them if they know about this (telling them "my web application cannot unzip files on the server")?
ffcato replied on at Permalink Reply
yes and they don't know anything... please help...

Josh
jordanlev replied on at Permalink Reply
jordanlev
It might be due to a php error with the specific php version you're using:
http://www.concrete5.org/community/forums/installation/there-was-an...

Or maybe your problem is you're out of disk space on your server:
http://www.concrete5.org/community/forums/installation/upgrade-from...

Or it might be something else entirely (it's impossible to say because every server's setup is slightly different), in which case you'll have to manually install it by downloading an archive of the addon, unzipping it on your own computer, then uploading the unzipped addon to your site's "packages" directory via FTP.
jazzypants replied on at Permalink Reply
Hi jordan i'm also getting this error on all my addons, i'm running c5 through wamp on localhost. Is there something extra i need to install on wamp to make unzip work? any ideas
citytech2 replied on at Permalink Reply
citytech2
From my knowledge its the $zip->open that causes problems thus using a version 5.2.x in my case seems to download the file but does is then unable to open the zip file, the php error being something to do with the file size, thus the Exception being thrown the addition of "version_compare(phpversion(), '5.3.0', '>=')" seems to get the server to use shell_exec() instead of the $zip->open().


The relevant code appears to be the following (line 59 conrete/libraries/archive.php)

protected function unzip($directory) {
      $file = $directory . '.zip';
      $fh = Loader::helper('file');
      if (version_compare(phpversion(), '5.3.0', '>=') && function_exists('zip_open')) {
         $zip = new ZipArchive;
         if ($zip->open($fh->getTemporaryDirectory() . '/' . $file) === TRUE) {
            $zip->extractTo($fh->getTemporaryDirectory() . '/' . $directory . '/');
            $zip->close();   
            return $fh->getTemporaryDirectory() . '/' . $directory;
         }         
         throw new Exception(t('There was an error unpacking the file. Perhaps you have not uploaded a valid zip file, or you do not have zip installed.'));         
       } else {
         $ret = @shell_exec(DIR_FILES_BIN_UNZIP . ' ' . $fh->getTemporaryDirectory() . '/' . $file . ' -d ' . $fh->getTemporaryDirectory() . '/' . $directory . '/');
         $files = $this->f->getDirectoryContents($fh->getTemporaryDirectory() . '/' . $directory);
         if (count($files) == 0) {



Citytech