dora1989
2014-05-16 00:47
浏览 63
已采纳

致命错误:“未注册类”创建COM对象

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?

图片转代码服务由CSDN问答提供 功能建议

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

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

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

找到其他SO问题后:< / p>

来自PHP的类未注册错误

无法创建COM对象'X':未在另一个WAMP中注册的类

我运行了 regsvr32.exe (32位版本) )我的DLL带有消息提示,表明注册成功。

并且还验证了CLSID存在于al l注册表中的正确位置(两台计算机上的注册表项都相同):

  HKEY_CLASSES_ROOT \ Wow6432Node \ CLSID 
HKEY_LOCAL_MACHINE \ Software \ Classes \ Wow6432Node \ CLSID 
 <  / code>  
 
 

有谁知道为什么我仍然收到此错误? 是由于Windows Server 2012 OS吗?

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douche1936 2014-05-21 14:06
    已采纳

    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.

    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.

    打赏 评论

相关推荐 更多相似问题