首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >致命错误:在第13行的E:\Server\wwwroot\PHPWebAdmin\initialize.php中找不到类“COM”

致命错误:在第13行的E:\Server\wwwroot\PHPWebAdmin\initialize.php中找不到类“COM”
EN

Stack Overflow用户
提问于 2012-08-17 16:44:52
回答 3查看 15.5K关注 0票数 2

我正在尝试在"Windows Server2008 Enterprise Edition Service Pack1“中设置 hMailServer 。我已经设置了hMailServer、Apache、PHP和webmail Interface "AfterLogic webMail”successfully.And all work well.But我在尝试安装Windows时遇到了问题错误消息如下:

代码语言:javascript
复制
Fatal error: Class 'COM' not found in E:\Server\wwwroot\PHPWebAdmin\initialize.php on line 13

此信息发生在访问"http://192.168.2.66:8088/PHPWebadmin/"“时。

我已经按如下方式配置了PHP配置文件php.ini选项:

代码语言:javascript
复制
[PHP]
register_globals = Off
display_errors = Off

doc_root = "E:/Server/wwwroot"
extension_dir = "E:/Server/php5_4_5/ext"

[Session]
session.save_path = "E:/Server/php5_4_5/tmp"

[COM]
com.allow_dcom = true

我还按照hMailServer手册的建议完成了这些工作:

代码语言:javascript
复制
DCOM permissions
Overview
By default, IIS6 is not allowed to connect to hMailServer because of the Distributed COM permissions that Windows uses. Also, Apache run as a user account with restricted permissions is not allowed to connect by default.

Steps
Follow these steps to give IIS or Apache the required permissions to connect to hMailServer using DCOM.

1.Start DCOM config by selecting Start, Run, enter dcomcnfg.exe and press OK. 
2.In the Component Services program, expand the Component Services folder 
3.Expand down to Computers | My Computer | DCOM Config 
4.Right-click on hMailServer and select properties 
5.Select the Security tab 
6.Under "Launch and Activation Permissions", select Customize and click on Edit 
7.Under "Group or user names", click Add 
8.For IIS6: add the built-in anonymous IIS user account 
9.For Apache: add the Apache user account 
10.Set the Local Launch and Local Activation permissions for this user to Allow 

实际上,我甚至尝试在DCOM配置中授予EveryOne权限。

安装PHPWebAdmin是为了给用户一个地方来更改他们的电子邮件密码。

这里的环境:Windows Server 2008,Apache2.2,PHP5.4.5。

为什么会出现这个问题?该如何处理呢?

非常感谢!

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2012-08-17 17:09:37

windows.php.net的php 5.4.5版本将com/dotnet模块作为扩展dll发布。如果您的php版本也是这种情况,您可以通过

代码语言:javascript
复制
extension=php_com_dotnet.dll

在你的php.ini中

票数 6
EN

Stack Overflow用户

发布于 2013-06-15 07:28:16

如果您使用的是Windows8和apache,而extension=php_com_dotnet.dll对您不起作用,那么:

php_com_dotnet.dll file复制到c:/windows/system32并写入php.ini文件:

代码语言:javascript
复制
extension = c:/windows/system32/php_com_dotnet.dll

我使用的是windows的windows8和apache服务器。对我很管用。

我希望这对您有帮助:))

票数 0
EN

Stack Overflow用户

发布于 2018-08-03 16:49:39

为了解决这个问题,我注意到在IIS10/ Windows Server2016下,我不能使用32位版本的PHP7.2 (FastCGI)来使这个接口工作。

解决方案对我来说非常明显:使用64位版本的PHP7.2运行它(在我的例子中,为子目录"PHPWebadmin“创建一个新的应用程序,并更改处理程序映射,因为由于一些特定的32位开发扩展,主应用程序需要使用32位版本的PHP运行)。

希望能有所帮助,

问候

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12002591

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档