0

I'm trying to work with hMailServer and XAMPP but I keep obtaining the

" Fatal error: Uncaught Error: Class 'COM' not found in C:\xampp\htdocs\PHPWebAdmin\initialize.php:16 Stack trace: #0 C:\xampp\htdocs\PHPWebAdmin\index.php(23): require_once() #1 {main} thrown in C:\xampp\htdocs\PHPWebAdmin\initialize.php on line 16 ".

Even after I had,

1) Modified the config.php with the right strings:

$hmail_config['rooturl'] = "http://localhost:8080/PHPWebAdmin/" 

and

$hmail_config['rootpath'] = "C:\xampp\htdocs\PHPWebAdmin";

2) Installed the extension=php_com_dotnet.dll and the DCOM class;

3) Enabled the DCOM;

4) Already modified the security of HMAILSERVER in dcomcnfg.exe.

5) Apache and MySql are running in XAMPP.

I can't think to no one else solution, somebody can help me?

kgangadhar
  • 4,886
  • 5
  • 36
  • 54

2 Answers2

0

That's described at PHPWebAdmin setup problems:

DCOM not being enabled

PHPWebAdmin uses the hMailServer COM API to access the settings and your objects in your hMailServer installation. For this to work, it may be required to enable DCOM in the PHP configuration. Make sure that com.allow_dcom = true exists and is uncommented in php.ini.

I presume that also means you need the COM extension too.

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
  • [COM] ; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs ; http://php.net/com.typelib-file ;com.typelib_file = ; allow Distributed-COM calls ; http://php.net/com.allow-dcom com.allow_dcom = true Already de-commented that, it still doesn't work – Francesco_RedKing Oct 29 '18 at 09:59
  • @Francesco_RedKing If "doesn't work" means that you still get "missing extension" that's because you haven't installed the extension. Setting configuration directives for an extension that isn't installed doesn't have any affect. If you mean something different please elaborate on that. – Álvaro González Oct 29 '18 at 10:07
  • I still get the same message that was displayed before, nothing on the error has changed. I checked the DCOM in the php.ini and I'm reading some of the setup problem from hMailServer site, but still don't know what's wrong. Maybe i should edite the initialize.ini file from PHPWebServer folder? – Francesco_RedKing Oct 29 '18 at 10:10
  • But have you installed the COM extension in the first place? That involves something like `extension=php_com_dotnet.dll`. You don't even mention that. – Álvaro González Oct 29 '18 at 10:13
  • Yes,sorry but i forgot to mention that, I've already installed that and DCOM class too (i'm going to edit that, thanks for notify me that error). – Francesco_RedKing Oct 29 '18 at 10:18
0

In your php.ini (make sure it is the one Apache2 is loading when it loads mod_php) find the the line

; extension=php_com_dotnet

Remove the ; in the beginning, save the file and restart Apache2. Then check again.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
Dravion
  • 36
  • 1