4

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?

John
  • 755
  • 1
  • 18
  • 46
  • How did you finally solve this issue? I also get the "Failed to create" error and I followed the instructions, too. – Martin Braun Mar 06 '16 at 18:16
  • It was down to dcom in the end. I think i scrubbed it all and started again, following the dcom instructions below and it worked out. – John Mar 07 '16 at 16:40
  • Sorry I cant be more specific, it was ages ago now – John Mar 07 '16 at 16:41

3 Answers3

2

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/

1

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

Pupil
  • 23,834
  • 6
  • 44
  • 66
  • I've upgraded PHP to version 5.4.24 and made sure the 'extension=php_com_dotnet.dll' is in the php.ini. Now i'm seeing a new error... 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. Any suggestions? – John Dec 04 '14 at 10:51
0

check php.ini file and remove ; from

;com.allow_dcom = true
Syscall
  • 19,327
  • 10
  • 37
  • 52
amoq
  • 16