Php – Fatal error: Class ‘COM’ not found in C:\inetpub\wwwroot\test.php on line 22

comdcomemail-serveriisPHP

There is an IIS 7 webserver and PHP 5.3

I have set com.allow_dcom = true on php.ini file and restarted the webserver.

I need to use hmailserver by:

$obBaseApp = new COM("hMailServer.Application");

It says:

Fatal error: Class 'COM' not found in C:\inetpub\wwwroot\test.php on
line 22

Best Answer

The php 5.4.5 build from windows.php.net ships the com/dotnet module as extension dll. If that's the case with your version of php too you can enable the module via

extension=php_com_dotnet.dll

in your php.ini

Quotation from this link: https://stackoverflow.com/a/12002924/1274378

Related Topic