zip error with upgrade 5.5.1

Permalink
I just installed C5 to a client's server and bought a theme but when installing it I received this error "There was an error unpacking your file. Perhaps you have not uploaded a valid zip file, or you do not have zip installed. on 5.5.1"

 
schmidtc63 replied on at Permalink Reply
I just had this same problem on Windows/IIS. If that's what you're using, here are the steps I took to fix it:

1. Modify php.ini and look for the line
extension=php_zip.dll
Make sure that line is not commented out.

2. Make sure the packages directory has write privileges for the IUSR_ account that's accessing your site.

3. Modify concrete\helpers\file.php. In there is a function called copyAll. Replace it with this code which simply makes sure that unix-based front slashes are replaced with windows-based back slashes:

public function copyAll($source, $target, $mode = 0777) {
      $source = str_replace('/','\\',$source); //<-- take the passed $source and replace the front slashes with back slashes for windows compatibility
      $target = str_replace('/','\\',$target); //<-- take the passed $target and replace the front slashes with back slashes for windows compatibility
      if (is_dir($source)) {
         @mkdir($target, $mode);
         @chmod($target, $mode);
         $d = dir($source);
         while (FALSE !== ($entry = $d->read())) {
            if ( $entry == '.' || $entry == '..' || substr($entry, 0, 1) == '.') {
               continue;
            }
            $Entry=str_replace('/','\\',$Entry);   //<--      
            $Entry = $source . '\\' . $entry;     //replaced forward slashed with back slashes  for windows compatibility     
            if (is_dir($Entry)) {
               $this->copyAll($Entry, $target . '\\' . $entry, $mode); //replaced forward slashed with back slashes  for windows compatibility


Hope that helps.
schmidtc63 replied on at Permalink Reply
You may also have to restart IIS after modifying php.ini using:
iisreset /noforce