Page 1 of 1

Problem with PHPWebAdmin

Posted: 2009-01-15 11:25
by Lee Thompson
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?

Re: Problem with PHPWebAdmin

Posted: 2009-01-15 11:30
by martin
What PHP version?

Re: Problem with PHPWebAdmin

Posted: 2009-01-15 11:39
by Lee Thompson
PHP Version 5.2.8

Re: Problem with PHPWebAdmin

Posted: 2009-01-15 11:46
by martin
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?

Re: Problem with PHPWebAdmin

Posted: 2009-01-15 11:56
by Lee Thompson
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).

Re: Problem with PHPWebAdmin

Posted: 2009-01-15 12:08
by martin
Can you temporarily give Everyone access to the hMailServer DCOM object to see if that has any effect?

Re: Problem with PHPWebAdmin

Posted: 2009-01-15 12:20
by Lee Thompson
martin wrote:Can you temporarily give Everyone access to the hMailServer DCOM object to see if that has any effect?
Same error, unfortunately.

Re: Problem with PHPWebAdmin

Posted: 2009-01-20 03:17
by Lee Thompson
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

Re: Problem with PHPWebAdmin

Posted: 2009-01-20 04:22
by Lee Thompson
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.

Re: Problem with PHPWebAdmin

Posted: 2009-01-20 14:42
by Caspar
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.

Re: Problem with PHPWebAdmin

Posted: 2010-04-04 06:28
by jrchan
I have the same problem and my solutions was add "Everyone" Group to hmailserver DCOM instead IUSR_