Ok this is my first attempt at a how-to so be nice
To install and configure Roundcube on hMailServer, using the default MySQL installation that comes with hMailServer. On a dedicated server. Everything is installed on the same machine, etc hMailServer, PHP, Roundcube….
Things you need,
Copy of PHP, you can find it here http://www.php.net
Copy of Roundcube this can be found here http://www.roundcube.net
Copy of SQLyog free edition, this can be downloaded here http://www.webyog.com
Installed and operational copy of hMailServer. (not covered here)
Installed and operational copy of IIS (not covered here)
I looked around a lot when I undertook this for the first time, and whilst there was heaps of installation guides on the internet, I found most were incomplete, a little hard to understand, or lacking in quality information. I even found the install guide on PHP's own website very weak if your intending the run IIS. Which I assume is why you’re here. So the best and easiest tutorial was from this person. http://www.peterguy.com/php/install_IIS6.html
Put simply it worked, with the minimum of fuss. Follow it and in no time flat you will have a working installation of PHP.
Unpack the copy of Roundcube you just downloaded, inside you will find a file marked “install” open it with your favourite text editor (WordPad etc) This is reasonably well documented for the first timer. Basically you have 4 main things to do, they are;
**Create a new database and a database user
*To do this open up SQLyog Enter in the information required in the fields as below, and press connect.
*Please note you will find the MySql database password in the hMailServer.INI file in the “bin” folder of your hMailServer installation. You will need to use the provided “DecryptBlowfish.vbs” script in the hMailServer\Addons\Utilities folder to decrypt the password for use in SQLyog.
**You now need to follow the directions in the Install File under Database Setup. At the time of writing hMailServer’s internal MySQL is 4.1.18, so you will need to follow the instructions in the MySQL 4.1.x/5.x section.
*Basically you need to Click on “DB” in the menu (top) and enter the name of the database. E.g. roundcubemail. I called mine just roundcube.
**Now you need to “Create database tables” You will find a file called mysql.initial.sql in the SQL folder of your roundcube package. Open the file and copy its contents to the clipboard.
*Now in SQLyog, the section we are interested is called Query, paste the contents of the mysql.initial.sql file into here.
*Now Click on Edit>Execute Query>Execute Current Query. This will setup the tables in your new database.
*To create the new database user Click “Tools>User Manager>Add User” and fill in the fields, make sure the user has the following privileges
**Rename the files config/*.inc.php.dist to config/*.inc.php, (remove the .dist extension from them) Now modify the files in config/* to suit your local environment
*Open up the db.inc.php file, here the only thing you need to modify is this line of code $rcmail_config['db_dsnw'] = 'mysql://roundcube:yourdatbasepassword@localhost/roundcube'; Close and save.
*Now open main.inc.php and edit this according to your preferences, it is well documented so I don’t need to comment about this except a the time of writing there is a cache issue yet to be resolved in 0.1Beta2, so it is recommended to turn the cache off $rcmail_config['enable_caching'] = FALSE;
*One strange thing I found was when specifying a temp folder for Roundcube you have to type in the full path e.g. $rcmail_config['temp_dir'] = 'C:\mywebsite\mail\temp'; as for what ever reason \temp does not work, strange as all the other specified (logs etc) directories work without specifying the full path ?? One of life’s mysteries. Close and save when done.
**Ok all that is left is to upload Roundcube to your server (if you’re doing this remote) Or if you’re at the console then move it to a folder on your webserver. I used C:\mywebsite\mail. Just make sure that the internet guest account has privileges, it should have inherited these from your websites parent folder.
Please let me know if I have missed something, or something I said does not make sense and I will make the corrections to this page.
EDIT: The non default port that the internal MySQL uses is catching a few people out. So please make sure that you change the Port number in php.ini (mysql.default_port = 3307).
2nd Edit: Another user has reported that they needed to use slashes "/" not backslashes "\" in the temp folder path So if you having blank screen issues try this. He also reported that is you set the debug to $rcmail_config['debug_level'] = 8; Then it will output the error message to the screen.
3rd Edit: Another user has reported, In the latest version of SQLyog only the FIRST statement will be executed if the guide is followed (execute current). Ie. you get a db with 1 table, it will stop execution after the first ";". You have to select each statement one at a time and F5/execute. (F9 refreshes which also might be worth mentioning)