• Installing Moodle VLE when using Vista/XAMPP

    by  • July 16, 2007 • vista, windows vista, xampp • 2 Comments

    It seems there are some issues in installing Moodle 1.8 on a Vista machine. Using the documentation available from the Moodle wiki I managed to get up to running the install.php script, up to entering my database details which I had created using phpMyAdmin. On clicking next the whole process seems to time out and the browser just gives me a blank page.

    Anyway it looks like a few people have experienced the same problem and there is an excellent forum post on the Moodle site showing how to deal with this — essentially the main difference from the supplied installation details is to create a config.php file within the Moodle installation directory yourself giving paths to the moodle data directory and database details, rather than going through the install.php routine.

    Anyway thanks to John McGrath, this seemed to work perfectly on my Vista Home Premium machine, this is how he did it (modified slightly):

    1. Installed xampp from the xampp site
    2. Download and put moodle into the htdocs forlder…. as you should…I called it moodle16 cos it was a 1.6
    3. Create a new directory one level up from htdocs called moodledata
    4. Create your database using phpmyadmin – I called mine moodle16
    5. Cut and past the text below into a notepad file and call in config.php. Put config.php into the moodle directory (same one as config-dist.php)
    <?php /// Moodle Configuration File
    unset($CFG);
    $CFG->dbtype = ‘mysql’;
    $CFG->dbhost = ‘localhost’;
    $CFG->dbname = ‘moodle16’;
    $CFG->dbuser = ‘root’;
    $CFG->dbpass = ”;
    $CFG->dbpersist = false;
    $CFG->prefix = ‘mdl_’;
    $CFG->wwwroot = ‘http://localhost/moodle16’;
    $CFG->dirroot = ‘C:\xampp\htdocs\moodle16’;
    $CFG->dataroot = ‘C:\xampp\htdocs\moodledata’;
    $CFG->admin = ‘admin’;
    $CFG->directorypermissions = 00777; // try 02777 on a server in Safe Mode
    $CFG->unicodedb = true; // Database is utf8
    require_once(“$CFG->dirroot/lib/setup.php”);
    // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,
    // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.
    ?>

    For security, you might want to change the dbuser/dbpass to a user granted permissions to the moodle16 database, as per the original Moodle installation documentation.

    About

    .NET developer at thetrainline.com, previously web developer at MRM Meteorite. Awarded a PhD in misbehaviour detection in wireless ad-hoc networks.A keen C# ASP.net developer bridging the gap with APIs and JavaScript frameworks, one web app at a time.

    http://www.paulkiddie.com

    2 Responses to Installing Moodle VLE when using Vista/XAMPP

    1. Felix
      June 28, 2009 at 8:42 pm

      Thanks for this one, I just ran into this problem and had no access to the official forum.

    2. supunmali
      October 24, 2009 at 5:34 pm

      Thanks.. it worked fine..

    Leave a Reply

    Your email address will not be published. Required fields are marked *