System Administrator's Guide/Installing Mahara/Installing Mahara in Wampserver
From Mahara Wiki
< System Administrator's Guide | Installing MaharaRevision as of 13:03, 12 May 2011 by WikiSysop
If you need to set up a Mahara development site, and you don´t have prior knowledge of Debian-Ubuntu, you can install Mahara under WAMPSERVER. This last one is a web development environment which allows to run web applications using Apache, MySQL and php in a windows environment. It also includes phpmyAdmin and SQLiteManager to manage the databases.
The following steps have been only tested with Wampserver 2.0c, so if you have already a previous version installed and doesn’t work, you may need to upgrade to 2.0c.
If you are using a newer version, such as Wampserver 2.0h, you may find useful the troubleshooting section, at the end of this page.
1. The first step is to download and install the latest version of WAMPSERVER. This installation is pretty straightforward and you shouldn’t have any problems with it. Once it is installed, click on the shortcut Wampserver icon displayed on screen. You will notice a new small icon display on the bottom left of the taskbar. You can activate the different utilities of WAMPSERVER by clicking on that small icon.
2. Download the latest stable version of Mahara (we'll assume you've downloaded the .zip file).
3. Extract the contents of the Mahara zip file in a temporary directory. Rename the htdocs subdirectory to 'mahara' (without the quotes) and then move that subdirectory inside the /www directory that Wampserver has created in your hard-drive (we'll assume it's C:\wamp\www). Also create the data directory for Mahara inside the Wampserver installation directory (we'll assume it's C:\wamp\data).
4. The next step is to configure all the variables in the config-dist.php file. You need to complete this file with the values of your installation:
$cfg->dbtype = 'mysql5';
$cfg->dbhost = 'localhost';
$cfg->dbport = null;
$cfg->dbname = 'mahara'; // this is the name of the mahara database
$cfg->dbuser = 'root'; // this is usually the default user for the database administrator.
$cfg->dbpass = ''; If you have added a password to your root user, you should add the password here.
$cfg->dbprefix = '';
You need to configure the paths for the wwwroot and dataroot directories with the values in your installation. In my case: $cfg->wwwroot = 'http://localhost/mahara/'; and $cfg->dataroot = 'C:\\wamp\\data'; (the double slashes are important).
Leave the rest of the config-dist file as it is. Once you have saved the file, rename it as “config.php”
5. Before launching Mahara, we need to create the database, with the same name that we have set up in the config.php file. For that, go to the “phpmyAdmin” menu of “Wampserver”. Type “mahara” -or the name you have added for your database in the config file- in the box “create new database”, select “utf8_unicode_ci” in the drop down select box and click on the “Create” button.
6. Once the database has been created, go to the “localhost” option of Wampserver. You will see that under “Project” (it's called “Your Projects” under Wampserver 2.0h and above), there is a new folder called “mahara”. Click on it in order to complete the installation.
If everything goes OK, Mahara will start installing the different pluggins and components in the database.
When the installation finishes, if everything goes OK, you will be prompted to log in first time in Mahara as administrator (remember that the username is “admin” and the password “mahara”).
Q: I got an error message saying that "the curl extension is not included". How can I enable it?
A: You can enable additional extensions in the file php.ini. The easiest way to do so is by clicking on the Wampserver icon, going to the php folder visible icon and clicking on the the php.ini file. Then, you need to uncomment the line "extension=php_curl line" and save the file. Next click on the Wampserver icon and select “Restart all services”. Then go back to your browser window and click on the “refresh” button to restart the Mahara installation.
Q: I got an error message saying that "Your server does not have the mime_magic extension enabled. Mahara may have trouble detecting file types". How can I fix this?
A: You need to use the Fileinfo extension (as the original Mime Magic extension has been deprecated).
Q: I have followed all the aforementioned steps, but Mahara gets stuck when installing the first component (core code).
A: Are you using Wampserver 2.0h?... Although we cannot guarantee that the following instructions are going to solve your problem, try this:
- In the php.ini, increase the values of the following variables:
max_execution_time = 120
memory_limit = 256M.
(just restart all wampserver services after that)
2. Open the file hdocts/lib/db/install.xml and replace the code for view_layout table with this one:
where the original field "columns" have been now replaced by "1columns" (you will be able to rename again this field once the Mahara database has been created).
3. If there is an incomplete Mahara database already created by the installer, just delete it and start the installation again, by going to the step 6 of the previous section.
As I mentioned before, we cannot guarantee that this is going to solve your problem. Mahara was developped to run on linux/unix distributions from the very beginning, and we are trying different "patches" to make it work with windows.
If this does not solve your problem, you can ask for additional help at Mahara Community.