PHPWebAdmin not working - DCOM error, despite modifying permissions

2.8k views Asked by At

I'm trying to set up PHPWebAdmin to work with an installation of hmail.

I understand that for php version 5.3.15 / 5.4.5 and higher the COM API has been disabled as a module. I was using PHP version 5.3.21, I went ahead upgraded to PHP 5.4.24 and added the following to my php.ini

    extension=php_com_dotnet.dll 

Before the upgrade I was seeing the following error...

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

After upgrading PHP my error changes to...

Failed to create COM object `hMailServer.Application': Access is denied. This problem is often caused by DCOM permissions not being set.

I followed the instructions here: https://www.hmailserver.com/documentation/latest/?page=howto_dcom_permissions

I granted the IUSR user the DCOM permissions after checking in IIS that this is the user used for default anonymous auth, but the error persists and I am stuck for things to try next.

Any suggestions?

3

There are 3 answers

0
amoq On BEST ANSWER

check php.ini file and remove ; from

;com.allow_dcom = true
1
Pupil On

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

0
user3799019 On

Try this, I had the same issue and it worked for me:
1: Type dcomcnfg.exe at your command prompt
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: “Group or user names”, click Add
8: Type IIS_IUSRS and click Check Names
9: Select and add the built-in anonymous IIS user account
That should do it. It did it for me.
For more details, see:
https://wiztelsys.com/blog/permission-issues-with-dcom-in-webmail/