After several days : Help with PHP Admin, please !

Forum for things that doesn't really have anything to do with hMailServer. Such as php.ini, beer, etc etc.
Post Reply
ejaeger
New user
New user
Posts: 7
Joined: 2019-04-18 01:23

After several days : Help with PHP Admin, please !

Post by ejaeger » 2019-04-18 01:37

Good evening, @World !!!

I tried in several ways to make PHPWebAdmin or hMailAdmin work, but no !

I am using a Win10 (not an Insider release) + IIS + PHP 7.1.7 NTS x64 (manually installed).

The
- system path has been updated
- php.ini file has been changed
- hMailServer DCOM component has additional rights for IUSR and Everybody for local access

… But I have the so well known message :
Failed to create COM object `hMailServer.Application': Acc�s refus�. (with a part in French, sorry !)
This problem is often caused by DCOM permissions not being set.


Could someone help me, please ! I am going to die with it !!!

And an additional and optional question : But why an admin in PHP ? Why ??? :cry:

Many thanks by advanced.

Regards,

Eric

palinka
Senior user
Senior user
Posts: 986
Joined: 2017-09-12 17:57

Re: After several days : Help with PHP Admin, please !

Post by palinka » 2019-04-18 15:05

In my case, i had to download and install this php extension:

extension=php_com_dotnet.dll

The is also a section in php.ini for [COM]. I just had a look at mine and all lines are commented out, but there is this line:

; allow Distributed-COM calls
; http://php.net/com.allow-dcom
;com.allow_dcom = true

Maybe if you simply un-comment that line you could get it to work. I don't remember what i did to make it work for me, but ultimately it ended up with downloading php_com_dotnet.dll and enabling it in php.ini.

User avatar
Dravion
Senior user
Senior user
Posts: 1423
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: After several days : Help with PHP Admin, please !

Post by Dravion » 2019-04-18 16:28

Thats correct, the DOT NET COM Extension Module for PHP needs to be enabled in PHP

The easiest PHP Install is, download PHP 7.3 or higher from https://windows.php.net/download#php-7.3

01) Choose 7.3 or higher and select x64 and "Non Thread Safe" but not the Debug package
02) For your convenience, its this Archive: https://windows.php.net/downloads/relea ... 15-x64.zip
03) Unzip it and move the unzipped folder to: C:\Program Files\php\php-7.3.4-nts-Win32-VC15-x64
04) Open an Editor like Windows Notepad (as Admin -> Startmenü, right click as Admin)
05) Open in the Editor C:\Program Files\php\php-7.3.4-nts-Win32-VC15-x64\php.ini
06) Navigate in the php.ini file to line 887 and find extension=bz2
07) Before extension_dir = "ext" before the line extension=bz2 (so PHP can find its extensions
08) Insert extension=php_com_dotnet after extension=bz2
09) Save the file in the Editor (remember, Editor must run in Admin mode or you cannot save your changes)
10) Open a Windows Command Prompt Window and change Folder to C:\Program Files\PHP\php-7.3.4-nts-Win32-VC15-x64
11) Type in the command php -m + ENTER which will show the list of all Extensions PHP has loaded
12) Doublecheck if com_dotnet is in the list after you typed in php -m, make sure there is no Error
13) In IIS Manager make sure PHP is known as Module and *.php files are Mapped correctly (under IIS Settings)

Now open your Browser and open the url http://localhost + your PHPWebAdmin/ URL

ejaeger
New user
New user
Posts: 7
Joined: 2019-04-18 01:23

Re: After several days : Help with PHP Admin, please !

Post by ejaeger » 2019-04-18 22:34

palinka wrote:
2019-04-18 15:05
In my case, i had to download and install this php extension:

extension=php_com_dotnet.dll

The is also a section in php.ini for [COM]. I just had a look at mine and all lines are commented out, but there is this line:

; allow Distributed-COM calls
; http://php.net/com.allow-dcom
;com.allow_dcom = true

Maybe if you simply un-comment that line you could get it to work. I don't remember what i did to make it work for me, but ultimately it ended up with downloading php_com_dotnet.dll and enabling it in php.ini.
Many thanks, Palinka !

In fact, I have these lines as they are in the php.ini file :

extension_dir = "ext"
cgi.force_redirect = 0
cgi.fix_pathinfo=0
fastcgi.impersonate = 1
com.allow_dcom = true
extension=php_com_dotnet.dll

I believe there is a rights issue with the hmailserver DCOM component, but I do not know how to fix it as it seems to be well configured.

:s

But many thanks for your help and your time, really ! :)

Eric

palinka
Senior user
Senior user
Posts: 986
Joined: 2017-09-12 17:57

Re: After several days : Help with PHP Admin, please !

Post by palinka » 2019-04-18 22:45

ejaeger wrote:
2019-04-18 22:34

I believe there is a rights issue with the hmailserver DCOM component, but I do not know how to fix it as it seems to be well configured.
That's why i prefer xampp/apache over IIS. It runs under user system and doesn't have any of these issues. To my inexperienced eye, it seems like every new thing you add requires a new permission or 2 with IIS. If you're only using IIS for this purpose, maybe try scrapping it and giving xampp a go.

By the way, there are no rights issues with hmail and dcom. It's only other apps that want access that have rights issues.

ejaeger
New user
New user
Posts: 7
Joined: 2019-04-18 01:23

Re: After several days : Help with PHP Admin, please !

Post by ejaeger » 2019-04-18 23:00

Hello Palinka,

No issue with DCOM ? I found several articles about that on the Net. It may be easier to setup PHP with Apache but I would like IIS to work as I have it on my machine :)

It is a shame for me to try to make the Admin work in PHP as it would have been so easier to develop it in ASP.NET. All is already on the machine, why the need to install additional components ? But this is my own point of view :)


In the meanwhile, it does not work for me :D


I am not administrator of my laptop (it is wanted)... Maybe there is something to do with it...


B.R.

Eric

User avatar
Dravion
Senior user
Senior user
Posts: 1423
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: After several days : Help with PHP Admin, please !

Post by Dravion » 2019-04-19 02:14

Its not necessary easier with Apache.

Focus on PHP Integration into IIS first.

palinka
Senior user
Senior user
Posts: 986
Joined: 2017-09-12 17:57

Re: After several days : Help with PHP Admin, please !

Post by palinka » 2019-04-19 02:53

Dravion wrote:
2019-04-19 02:14
Its not necessary easier with Apache.
It is for me. But that's just me because i never used IIS since Microsoft PWS. Remember that? :mrgreen:

User avatar
mattg
Moderator
Moderator
Posts: 20026
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: After several days : Help with PHP Admin, please !

Post by mattg » 2019-04-22 05:20

ejaeger wrote:
2019-04-18 01:37
I am using a Win10 (not an Insider release) + IIS + PHP 7.1.7 NTS x64 (manually installed).

- hMailServer DCOM component has additional rights for IUSR and Everybody for local access
Need to ALSO do this for the IIS_IUSRS group
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

ejaeger
New user
New user
Posts: 7
Joined: 2019-04-18 01:23

Re: After several days : Help with PHP Admin, please !

Post by ejaeger » 2019-04-24 13:14

palinka wrote:
2019-04-19 02:53
Dravion wrote:
2019-04-19 02:14
Its not necessary easier with Apache.
It is for me. But that's just me because i never used IIS since Microsoft PWS. Remember that? :mrgreen:
PWS ? Ah ! Ahhhh ! Yes :)

But Apache is definitively so slow when you need performance (at least 1/12 or 1/20 of IIS) :)

But… Well… For now I just need to make it "just work" :D

ejaeger
New user
New user
Posts: 7
Joined: 2019-04-18 01:23

Re: After several days : Help with PHP Admin, please !

Post by ejaeger » 2019-04-24 13:20

mattg wrote:
2019-04-22 05:20
ejaeger wrote:
2019-04-18 01:37
I am using a Win10 (not an Insider release) + IIS + PHP 7.1.7 NTS x64 (manually installed).

- hMailServer DCOM component has additional rights for IUSR and Everybody for local access
Need to ALSO do this for the IIS_IUSRS group
Thanks Mattg,

I just have added IIS_IUSRS in both … and it worked !!!

Damned !


Many thanks to you and to all the one who helped me !!! :)


B.R. dear fellowes !

Eric

User avatar
Dravion
Senior user
Senior user
Posts: 1423
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: After several days : Help with PHP Admin, please !

Post by Dravion » 2019-04-24 16:56

Glad it works!

User avatar
mattg
Moderator
Moderator
Posts: 20026
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: After several days : Help with PHP Admin, please !

Post by mattg » 2019-04-25 01:41

ejaeger wrote:
2019-04-24 13:14
But Apache is definitively so slow when you need performance (at least 1/12 or 1/20 of IIS) :)
That is NOT my experience
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

ejaeger
New user
New user
Posts: 7
Joined: 2019-04-18 01:23

Re: After several days : Help with PHP Admin, please !

Post by ejaeger » 2019-04-28 19:43

mattg wrote:
2019-04-25 01:41
ejaeger wrote:
2019-04-24 13:14
But Apache is definitively so slow when you need performance (at least 1/12 or 1/20 of IIS) :)
That is NOT my experience
Of course, and this is certainly why you recommended me to move to this other solution, I have no issue with this.

Have a nice end of weekend :)

ejaeger
New user
New user
Posts: 7
Joined: 2019-04-18 01:23

Re: After several days : Help with PHP Admin, please !

Post by ejaeger » 2019-04-28 19:44

Dravion wrote:
2019-04-24 16:56
Glad it works!
Yes !

Thanks again.

Post Reply