2

我正在尝试在“Windows Server 2008 Enterprise Edition Service Pack 1”中设置hMailServer。我已经成功设置了 hMailServer、Apache、PHP 和 webmail 接口“AfterLogic webMail”。一切正常。但是我遇到了一个问题我尝试安装“ PHPWebAdmin ”。错误信息如下:

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选项如下:

[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 手册的建议完成了这些事情:

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。

为什么会出现这个问题?以及如何处理?

非常感谢!

4

3 回答 3

6

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

extension=php_com_dotnet.dll

在你的 php.ini

于 2012-08-17T09:09:37.457 回答
0

如果您使用的是 Windows 8 和 apache 服务器并且 extension=php_com_dotnet.dll不适合您,那么:

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

extension = c:/windows/system32/php_com_dotnet.dll

我正在为 windows 使用 windows8 和 apache 服务器。为我工作。

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

于 2013-06-14T23:28:16.343 回答
0

对于解决此问题的其他线索,我注意到在 IIS 10 / Windows Server 2016 下,我无法使用 32 位版本的 PHP 7.2 (FastCGI) 使该界面正常工作。

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

希望它可以帮助,

问候

于 2018-08-03T08:49:38.740 回答