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"
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:
publicfunction 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 compatibilityif(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
publicfunction 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 compatibilityif(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 compatibilitycontinue;}copy($Entry,$target.'\\'.$entry);//replaced forward slashed with back slashes for windows compatibility@chmod($target.'\\'.$entry,$mode);//replaced forward slashed with back slashes for windows compatibility}$d->close();}else{copy($source,$target);chmod($target,$mode);}}
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:
Hope that helps.