致命错误:“未注册课程”创建COM对象 [英] Fatal Error: "Class not registered" creating COM Object

查看:99
本文介绍了致命错误:“未注册课程”创建COM对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,该应用程序使用PHP(32位PHP)COM对象使用第三方软件,在我的本地计算机(Windows 7、64位)上一切正常。



当我将应用程序部署到实时服务器(Windows Server 2012,64位)并尝试创建COM对象时,我得到了



致命错误:无法创建对象未注册的类



在找到其他SO问题之后:





通过下面的评论看来,它对您有所帮助。


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):

HKEY_CLASSES_ROOT\Wow6432Node\CLSID
HKEY_LOCAL_MACHINE\Software\Classes\Wow6432Node\CLSID

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

解决方案

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"

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.

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.

Edit

Also try the article mentioned here:
http://www.gfi.com/blog/32bit-object-64bit-environment/

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

这篇关于致命错误:“未注册课程”创建COM对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆