Problem with PHPWebAdmin

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
User avatar
Lee Thompson
Normal user
Normal user
Posts: 36
Joined: 2009-01-15 11:18

Problem with PHPWebAdmin

Post by Lee Thompson » 2009-01-15 11:25

Yup, another one of these! :)

I've been searching the forum for awhile and while some folks have had similar problems the solutions did not work for me.

System: Windows 2003 Server R2 with SP2. Running IIS6.



The Problem:

The web admin page comes up with the following error:

Code: Select all

[15-Jan-2009 01:17:05] PHP Fatal error:  Uncaught exception 'com_exception' with message 'Failed to create COM object `hMailServer.Application': Invalid syntax

' in C:\Program Files\hMailServer\PHPWebAdmin\initialize.php:39
Stack trace:
#0 C:\Program Files\hMailServer\PHPWebAdmin\initialize.php(39): com->com('hMailServer.App...')
#1 C:\Program Files\hMailServer\PHPWebAdmin\index.php(12): require_once('C:\Program File...')
#2 {main}
  thrown in C:\Program Files\hMailServer\PHPWebAdmin\initialize.php on line 39

What I've tried...

DCOM permissions are set for all three IIS users.
PHP.ini's been edited to allow for dcom, session saves, error reporting and so forth.
I'm pretty sure it's not permissions, after all, the error says invalid syntax.
I even tried adding the machine's name as an argument on line 42 but it didn't make any difference at all.


Environment

hMailServer is running on the same machine as IIS. It's working fine, including the configuration applet. In fact, the configuration applet is running also on my workstation machine using DCOM.


I'm stumped on this one. Any ideas?

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Problem with PHPWebAdmin

Post by martin » 2009-01-15 11:30

What PHP version?

User avatar
Lee Thompson
Normal user
Normal user
Posts: 36
Joined: 2009-01-15 11:18

Re: Problem with PHPWebAdmin

Post by Lee Thompson » 2009-01-15 11:39

PHP Version 5.2.8

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Problem with PHPWebAdmin

Post by martin » 2009-01-15 11:46

I'm guessing it is still a permission issue. Don't see what else it could be.. What are the IIS users you've given access to and what access have you given?

User avatar
Lee Thompson
Normal user
Normal user
Posts: 36
Joined: 2009-01-15 11:18

Re: Problem with PHPWebAdmin

Post by Lee Thompson » 2009-01-15 11:56

martin wrote:I'm guessing it is still a permission issue. Don't see what else it could be.. What are the IIS users you've given access to and what access have you given?
For the hMailServer DCOM object:

Launch/Activate: Customize
IIS_WPG, IUSR_ORII, IWAM_ORII. Initially I set only Local Launch & Activation. In desperation I enabled all 4 options so presently Local Launch, Remote Launch, Local Activation and Remote Activation are all set to "Allow".

For the hMailServer folder and subfolders. All three users have full control.

For C:\Sessions, all three users have full control (for PHP Sessions).

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Problem with PHPWebAdmin

Post by martin » 2009-01-15 12:08

Can you temporarily give Everyone access to the hMailServer DCOM object to see if that has any effect?

User avatar
Lee Thompson
Normal user
Normal user
Posts: 36
Joined: 2009-01-15 11:18

Re: Problem with PHPWebAdmin

Post by Lee Thompson » 2009-01-15 12:20

martin wrote:Can you temporarily give Everyone access to the hMailServer DCOM object to see if that has any effect?
Same error, unfortunately.

User avatar
Lee Thompson
Normal user
Normal user
Posts: 36
Joined: 2009-01-15 11:18

Re: Problem with PHPWebAdmin

Post by Lee Thompson » 2009-01-20 03:17

Guess you're all stumped too :)

I tried running the initialize.php from the command line and I got an entirely different error. Not sure if this helps any but...

Code: Select all

Fatal error: Uncaught exception 'com_exception' with message 'Parameter 0: Type mismatch.
' in C:\Program Files\hMailServer\PHPWebAdmin\initialize.php:53
Stack trace:
#0 C:\Program Files\hMailServer\PHPWebAdmin\initialize.php(53): variant->Languag
e(NULL)
#1 {main}  thrown in C:\Program Files\hMailServer\PHPWebAdmin\initialize.php on line 53

User avatar
Lee Thompson
Normal user
Normal user
Posts: 36
Joined: 2009-01-15 11:18

Re: Problem with PHPWebAdmin

Post by Lee Thompson » 2009-01-20 04:22

Update.

I got it working by changing the user the web server is using for the virtual directory in IIS. I have it logging in as my domain account instead of the local IUSR_ account. I don't have this web server open from the internet so this is an adequate solution for me.

I'm still unsure why we couldn't get IUSR_ to work, even giving the COM object full control under that user wasn't enough.

User avatar
Caspar
Senior user
Senior user
Posts: 377
Joined: 2008-09-08 11:47
Contact:

Re: Problem with PHPWebAdmin

Post by Caspar » 2009-01-20 14:42

are the permissions from the IIS_USR good on the folder AND files?
if he douse not have read / run (execute) rights, it won't work. Try to see if that was the problem. IIS not always adds the user to the folder, and if the permissions are not right, it douse not show.
If you have strange problems or errors use the log analyzer! http://log.damnation.org.uk
Join us on IRC! http://hmailserver.com/irc_fullscreen.php

jrchan
New user
New user
Posts: 1
Joined: 2009-11-22 06:56

Re: Problem with PHPWebAdmin

Post by jrchan » 2010-04-04 06:28

I have the same problem and my solutions was add "Everyone" Group to hmailserver DCOM instead IUSR_

Post Reply