Windows IIS and auto unzipping

Permalink
How do I set up C5 on IIS 7 so that my users don't have to manually download and install themes and add-ons?

I've installed zip, unzip, 7zip, gzip...put them in /usr/bin/unzip, chanted, danced and cursed to no avail. I've taken a look at base.php, archive.php and MakeThisWorkNow.php to no avail.

Here is the error (right out of archive.php):
There was an error unpacking your file. Perhaps you have not uploaded a valid zip file, or you do not have zip installed.

The file actually gets downloaded into files/tmp as a zip file and there it sits. When I double-click on it, it unzips.

Help?

 
adajad replied on at Permalink Reply
adajad
Is zip extension enabled in php.ini? Make sure you have the following uncommented in you php.ini file, and that you have the corresponding file in your ext directory.

extension=php_zip.dll


If you do change your php.ini, make sure you restart the web services from an elevated command prompt

C:\Windows\system32>iisreset /noforce
schmidtc63 replied on at Permalink Reply
Did that and it helped get the file unzipped. Then, I had other problems in copying the file so I made the following changes to file.php:
//windows mod
   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 works perfectly. Windows uses backslashes so I just had to make sure that file.php was using them, too.