I have an app that makes use of third party software using PHP(32 bit PHP) COM object, everything is working fine on my local machine (Windows 7, 64bit).

When I deployed my app to a live server (Windows Server 2012, 64bit) and I try to create my COM object I'm getting the

Fatal Error: Cannot create object "Class not registered"

After finding these other SO questions:

Class not registered error from PHP

Failed to create COM object 'X': Class not registered in another WAMP

I have ran regsvr32.exe (the 32bit version) for my DLL with message prompt indicating successful registry.

And also verified that the CLSID exists in all the proper places in the registry (registry entries are the same on both machines):


Does anyone know why I am still receiving this error? Is it due to Windows Server 2012 OS?

Était-ce utile?

La solution

I'm not familiar with hosting php websites in windows but I know for IIS hosted websites I get this error for a myriad of reasons. Some of which you've mentioned above. When hosting in IIS I know there is a setting that needs to be set to True called "Enable 32 bit applications"

Enabled 32 bit applications

Also you want to make sure if you are transferring this file from another computer that the file is unblocked as this will cause a lot of headaches as well and strange errors.

Unblock files

Sometimes what I do as well is to write a simple test gui that calls this com dll to eliminate anything related to running it as a website. If you are able to access it with the gui application it could be something security related to running it as a website if the user the website is running under is different than the user launching the gui application.


Also try the article mentioned here:

It seemed to have helped you judging by the comment below.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top