Symptoms

After upgrade to OA 6.0.x zip/unzip in File Manager fails. The attempt to create new archive fails with the error:

Unable to create archive. 
Unable to upload file to FTP: "/webspace/httpdocs/testfolder.tld/readme.txt.zip"

Attempt to extract files from existing archive error fails with:

Unable to extract files from "HTTP/example.tld/test_archive.zip".
Error while extracting files: "D:\PHPUploadData\elfinder-tmp\w00123456\elF68FB.tmp\content is not a directory"

Cause

Missing 7zip environment variable in IIS configuration. It can be checked the the following way:

C:\Windows\system32>c:\Windows\System32\inetsrv\appcmd list config -section:system.webServer/fastCgi
<system.webServer>
<fastCgi>
<application fullPath="C:\PHP5\php-cgi.exe" monitorChangesTo="C:\PHP5\php.ini" activityTimeout="600" requestTimeout="600" instanceMaxRequests="10000">
  <environmentVariables>
    <environmentVariable name="PHP_FCGI_MAX_REQUESTS" value="10000" />
    <environmentVariable name="PHPRC" value="C:\PHP5\" />
    <environmentVariable name="TMP" value="D:\PHPUploadData" />
  </environmentVariables>
</application>
</fastCgi>
</system.webServer>

The issue has been reported to the development team as POA-80725 and fixed in OA 5.5 update 3.

Resolution

  1. Make sure that 7z package is installed on the host where File Manager is located

  2. execute the following command:

    C:\Windows\system32>c:\Windows\System32\inetsrv\appcmd set config -section:system.webServer/fastCgi /+"[fullPath='C:\PHP5\php-cgi.exe'].environmentVariables.[name='PATH',value='C:\Program Files (x86)\7z']"
    
  3. make sure that the path was added correctly:

    C:\Windows\system32>c:\Windows\System32\inetsrv\appcmd list config -section:system.webServer/fastCgi
    <system.webServer>
    <fastCgi>
    <application fullPath="C:\PHP5\php-cgi.exe" monitorChangesTo="C:\PHP5\php.ini" activityTimeout="600" requestTimeout="600" instanceMaxRequests="10000">
    <environmentVariables>
    <environmentVariable name="PHP_FCGI_MAX_REQUESTS" value="10000" />
    <environmentVariable name="PHPRC" value="C:\PHP5\" />
    <environmentVariable name="TMP" value="D:\PHPUploadData" />
    <environmentVariable name="PATH" value="C:\Program Files (x86)\7z" /> ====> New value
    </environmentVariables>
    </application>
    </fastCgi>
    </system.webServer>
    

Internal content