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

致命错误:“未注册类”创建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?

  • 写回答

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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog