致命错误:类';COM';在第13行的E:ServerwwwrootPHPWebAdmini


Fatal error: Class 'COM' not found in E:ServerwwwrootPHPWebAdmininitialize.php on line 13

我正在尝试在"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,PHP.4.5。

为什么会出现此问题?如何处理

非常感谢!

从windows.php.net构建的php 5.4.5以扩展dll的形式提供了com/dotnet模块。如果你的php版本也是这样,你可以通过启用模块

extension=php_com_dotnet.dll

在php.ini 中

如果您使用的是windows 8和apache服务器extension=php_com_dotnet.dll当时不适用于您:

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

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

我使用的是windows8和用于windows的apache服务器。为我工作。

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

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

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

希望它能有所帮助,

问候

相关文章:
  • 没有找到相关文章