This page describes how to install PHPWebAdmin, the PHP administration front-end for hMailServer.
- 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.
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 /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 PHPWebAdmin directory in the web root.
- Make sure there is a sub-directory named template_c and one named temp. If they do not exist, create them.
- Rename the file config-dist.php to 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 rootpath to your root web directory where PHPWebAdmin is placed.
$hmail_config['rootpath'] = "C:/wwwroot/PHPWebAdmin/";
- Set the value of rooturl to the URL where the PHPWebAdmin will be located.
$hmail_config['rooturl'] = "http://localhost/PHPWebAdmin/";
- Specify your username and password (hMailServer 3.x).
$hmail_config['admin'] = "administrator";
$hmail_config['adminpassword'] = "mysecretpassword";
- Open up php.ini, and make sure that short_open_tag is set to On
- If you're using IIS6, you need to follow these steps.
Step 3: Use it
Point your web browser to http://localhost/PHPWebAdmin and log in with the username and password you specified in config.php. If you are using hMailServer 4 or later, you should log in using your hMailServer account.
Common configuration errors
- When you specify paths and URLs in the config file, it is very important that you use the forward slash /, and not the backward slash , as folder separator. It is also very important that you end every path and every URL with /.
- If you are using IIS, you may need to give IUSR_[yourcomputername] modify and write access to the folders PHPWebAdmintemplate_c and PHPWebAdmintemp
- If you get error messages containing E_NOTICE, you should turn off notices. This is done by changing the value of error_reporting in php.ini
- If you are using Microsoft SQL Server for hMailServer, you may need to give the user IUSR_[computername] access to the hMailServer database.
This example assumes that your web root is C:/Program Files/Apache Group/Apache2/htdocs/.