This project is read-only.

Catastrophic Failure

Nov 1, 2010 at 4:41 PM

I have been trying to create the COM object through PHP on a Windows 2008 Server running IIS and I get the error: Could not create COM object 'Ionic.Zip.Zipfile' -Catastrophic Failure.

It was working perfectly on my development environment using Apache, could anybody point me in the right direction here please?



Nov 3, 2010 at 3:45 AM

It's a basic COM error.  COM is the activation model that PHP can use to utilize DotNetZip.  I can't say why COM is not able to activate DotNetZip.

To troubleshoot this, I suggest that you first verify the COM configuration of DotNetZip on the "live" machine.  I suggest these steps or stages.

  1. use the oleview tool (part of the (free) Windows SDK I think) to verify that the DotNetZip COM component is actually installed, and can be activated.   If it is not installed, then install it.  Check the DotNetZip documentation for how to do so.  If it is installed but cannot be activated, check the security on the object. Verify the ACLs.
  2. run a powershell script to verify that you can load DotNetZip (Ionic.Zip.dll) from a script.   If this does not work, double-check the location of the DLL.  Verify that the correct location is used in the powershell script, and verify that this location is also configured in the COM registry entries (via oleview).
  3. Verify that you can run a .NET application on the live server. DotNetZip requires .NET 2.0 or 3.0 or 3.5.  .NET 4.0 won't satisfy.  
  4. run a VBScript (use a sample from the DotNetZip source code or documentation) that activates the DotNetZip COM object.   
  5. try the same thing with PHP, but outside the IIS environment. 
  6. Finally, try the PHP Script running within IIS.

Good luck!