|__TOC__||'''Installing Moodle on 5
This step-by-step guide shows how to install Moodle on Uniform Server V5
.0-Nano. In addition shows how to resolve fixed paths allowing Moodle to be run from a USB memory stick.
Windows does not support true cron jobs however V5
.0-Nano has an integrated portable Cron catering for both hard drive and USB memory stick installations.
== Pre-Installation ==
# '''A)''' Create a new folder named '''moodle_b''' (Can be any name)
# Extract a new copy of Uniform Server V5.
0-Nano to this folder<br>(Double click on file to extract).
* Username: '''
boss'''* Password: ''' fred123'''
'''''[[#top | Top]]'''''
Its a small file locate the following
three lines (yours may be slightly different):
$CFG->wwwroot = 'http://localhost/moodle';
$CFG->dirroot = 'C:\moodle_b\UniServer\www\moodle';
$CFG->dataroot = 'C:\moodle_b\UniServer/moodledata';
The hard coded paths start with '''C:''' followed by a list of folders to the Moodle installation these hard coded paths prevent portability. Another problem, first line assumes you are running servers on localhost and standard port 80 this becomes an issue if you run [[#Move Servers | '''move servers''']] (multi-server operation) because it changes all ports.
Solution is to let PHP automatically calculate absolute paths and web-root folder.
Replace the above
three lines with the following code:
splitArray = explode(" \\www", __DIR__); // Split at folder www to $base = "$ splitArray[ 0]"; // find drive letter and sub - folders
$root = 'http://'.getenv("HTTP_HOST").'/moodle'; // Local testing
//$root = 'http://'.GetHostByName($REMOTE_ADDR).'/moodle'; // moving from event to event
$CFG->wwwroot = $root;
$CFG->dirroot = $base.'
\www\moodle';$CFG->dataroot = $base.' \moodledata';
The above change makes Moodle completely portable.
* Under '''Plugins'''
* Navigate to sub-folder '''Uniform Server 5-Nano Plugins'''
* Download file [http://sourceforge.net/projects/miniserver/files/Plugins/UniServer%2055-Nano%20Plugins/Applications/V55_Moodle/
Save this to folder UniServer, to install double click on file. Moodle is pre-configured and ready to go. Check out the read me file for latest information.