Installing PHPWebAdmin

Overview

This page describes how to install hMailServer WebAdmin, the PHP administration front-end for hMailServer.

Prerequisites

Apache or IIS (or any other PHP compatible web server)

PHP >= 4.3.11 or PHP >= 5.0.3. Due to bugs in PHP 4.3.10, hMailServer does not work with that version.
For php version 5.3.15 / 5.4.5 and higher the COM API has been disabled as a module. The error probably will be PHP Fatal error: Class 'COM' not found in \phpwebadmin\initialize.php on line xx. Make sure you edit the php.ini file has been edited with the value extension=php_com_dotnet.dll in the extentions.

For IIS , install PHP from the Web Platform Installer, and then enable php_com_dotnet.dll from there.

In the PHP configuration, the following settings must be configured for PHPWebAdmin to work properly:

register_globals must be set to off (register_globals was deprecated and doesn't exist from PHP 7.x)

display_errors must be set to off

For IIS 8.5 and higher, IIS App pool runs under Network Service. Network Service needs full rights to PHPWebAdmin folder which is an alternative to granting 'read and execute' permissions to IIS_IUSRS.

Step 1: Copy the files

The first step is to copy PHPWebAdmin from the hMailServer directory to your web root directory. The web root differs between web servers so check your web server's documentation if you're unsure where your web root is located. Copy the entire PHPWebAdmin from C:\Program Files/hMailServer to your web root. Example: If your web root is C:/wwwroot, copy PHPWebAdmin to C:\wwwroot, so that you get C:\wwwroot\PHPWebAdmin.

The description below assumes your web root is C:\wwwroot.

Alternately, you can use the PHPWebAdmin folder where hMailServer installed, you will neede to point your webserver to that folder and set permissions as above.

Step 2: Setup

Go to the WebAdmin directory in the web root.

Create a copy of the file named config-dist.php and give it the name config.php.

The file config.php contains the basic settings for PHPWebAdmin and needs to be modified to correctly adjust it for your system:

Set the value of rooturl to the URL where the WebAdmin will be accessed.

Example:$hmail_config['rooturl'] = "http://localhost/PHWebAdmin/";

If you're using IIS6 or run your web server (Apache or IIS) as a specific user account with limited permissions, you need to follow these steps.

Create a robots.txt file in the web server root to prevent Google and other search bots from indexing hMailServer WebAdmin. If a security vulnerability is found in PHPWebAdmin, this will make it harder for attacker to

Step 3: Use it

Point your web browser to http://localhost/PHPWebAdmin and log in with your hMailServer username and password.

When you upgrade your hMailServer installation to a later version, make sure to copy the latest WebAdmin from the hMailServer installation directory to your web directory. If you do not do this, you will get an error message when trying to access WebAdmin.