Shared Hosting Install Guide
From MirrorMed
To start with let me describe the server environment that I used. I don't know if this makes a huge difference but it might.
System: Linux node16.c1 2.4.20-28.8smp #1 SMP
Server: Apache
MySQL: 4.0.26-standard
PHP: 4.3.11
PHP MyAdmin: 2.6.1
Safe Mode: OFF
Open basedir: none
Display Errors: ON
Short Open Tags: ON
File Uploads: ON
Magic Quotes: ON
Register Globals: OFF
Output Buffering: OFF
Session save path: /imports/phpsessions
Session auto start: 0
XML enabled: Yes
Zlib enabled: Yes
Disabled Functions: none
The first thing you will need to do is to install a copy of MirrorMed on your local computer. The instructions in the Windows XP install guide are an excellent guide that will help you do this. If you follow the instructions exactly you should have no problems. One word of warning, however. Make sure your local Windows server environment is XAMPP. I tried it on Apache2Triad, Big Apache and even a custom environment built using Apache, MySQL, and PHP and none of them worked. I only mention this in order to try and save you some time. Work with XAMMP and you should be fine.
Once you have a local version of the software working, upload the file directory from your HTDOCS directory to your webserver via FTP. Don't try to do anything fancy. Just move a copy of the entire file folder to your server file by file. If you try to zip the directory and transfer it then unpack it on the server you may be disappointed. Don't say I didn't warn you.
When you have moved your files you will need to create a new empty MySQL database.
When that is done you will have to edit two congig files to reflect the new database and server environment. These files are located at:
mirrormed/local/config.php
mirrormed/freeb2/local/config.php
These files are both well documented so as long as you follow the instructions you should be fine. Just one more thing that will save you some problems later - assuming you haven't already done this - make sure you change both config files to the following
// Session Name
$config['app_name'] = "mirrormed";
This instruction is near the very top of the file. What you want to ensure is that the app_name = "mirrormed" and not "clearhealth". It only takes a second to confirm this and it can save you a lot of debugging later on.
When you have edited the config files, upload them to the appropriate location within your file structure.
The next step is to create a copy of your loacl MySQL database. PhpMyAdmin is the easiest way to accomplish this.
Select the database you want to copy from the left hand menu.
When it opens select the "Export" tab along the top.
Select all tables from the export section.
The next step is very important. XAMMP defaults to MySQL 5.0.x. Most production servers run MySQL 4.x.x because it is more stable. Make sure you know which MySQL version your server is running and select the export option for that MySQL version. You can't run a 5.0.x SQL query on a 4.x.x MySQL server! Please don't find this out the hard way.
The last step is to choose "save as file" and select NONE for compression! if you compress the export file something happens - I don't know what it is - but it doesn't import properly into your shared hosting environment.
When all this is done, simply save the file to your computer in a location where you can find it.
All we have to do now is import the database into our shared hosting environment. PHP MyAdmin is again the easiest way to do this.
Select your blank database from the list on the left.
When it opens select SQL from the tabs along the top.
Now you have to make a decision. You have three options. I tried them all and only one worked but I will explain them all here. First, you can browse to the SQL text file you exported from your local installation and select go. Don't be surprised if the server times out and the entire SQL dump is rendered useless. If this happens you have to drop all the tables and data in the database before you try another SQL dump. Existing data will be corrupt and it will not be overwritten!
The second option is that you can open the SQL text file on your local computer, choose edit, select all, copy and copy the entire query. Next, paste this into the "Run SQL query/queries on database xxx" window. Make sure the "Show this query here again" box is unchecked. It will take a few minutes for the information to be pasted into the window. When it is press go and wait. Again, don't be surprised if the server times out and the entire SQL dump is rendered useless. If this happens you have to drop all the tables and data in the database before you try another SQL dump. Existing data will be corrupt and it will not be overwritten!
Finally - and this is what worked for me - open the SQL text file on your local computer and select about a thousand instructions. Cut these and paste them into the "Run SQL query/queries on database xxx" window. The reason I suggest cutting the commands is so that you don't accidentally copy the same commands twice. After each cut you should also save your file so that if you get disturbed and can't finish this process in one session you will always know where you left off. Also, make sure your cut points always occur after a semi colon - ; - this means you have a full command. Where you choose to make your edit points doesn't matter as long as you follow this rule. Again, make sure the "Show this query here again" box is unchecked.
I know this sounds like a labourious process but it doesn't take as long as you might think and ultimately it will save you time and simplify your life.
Once the database dump is finished it is time to check your installation. This is the scariest part. Point your browser to
www.your-domain.com/your-mirrormed-installation
If all goes well, you should see the login screen. Use the login ID and Password from your local installation and all should be well.
Any problems, check your configuration files first. If that doesn't work, check the integrity of your database. My esperience was that by following these instructions the shared server version of the program opened immediately and with no problems. I hope the same works for you.

