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.
  • The PHP setting register_globals must be set to off for PHPWebAdmin to work properly.
  • In the PHP configuration, the following settings must be configured for PHPWebAdmin to work properly:
    • register_globals must be set to off
    • display_errors must be set to off

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.

Step 2: Setup

Go to the WebAdmin directory in the web root.

  1. Create a copy of the file named config-dist.php and give it the name config.php.
  2. 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/";

  3. 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.
  4. 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.

Common configuration errors

There's a few common set up mistakes. Read more in the troubleshooting guide.

 

 

Search documentation