Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Installing Moodle on Windows Vista.

Installing Moodle on Windows Vista

From MoodleDocs

Many people tried to install Moodle on Windows Vista, but got a blank screen after database config. This is due to some Vista permission issue. This method is from a Moodle forum and might help Moodle installation.

1. Create a "moodledata" directory somewhere on your PC ( May be c:\wwwroot\moodledata ) Not sure if this step is needed, but it worked.

  1. Right-click on the folder moodledata, select Properties, then select the Security tab.
  2. Click on "Everyone" ("Users" on some machines) in the top window (Group or User Names)
then click Edit.
  3. Check to allow read and write permissions for Everyone (List folder contents and Read &
Execute should already be checked)

2. Create config.php in your main Moodle directory

  <?php /// Moodle Configuration File
  
  unset($CFG);
  
  $CFG->dbtype = 'mysql'; //Database Type
  $CFG->dbhost = 'localhost'; //Database Host
  $CFG->dbname = 'moodle'; //Database Name
  $CFG->dbuser = 'root'; //Database User
  $CFG->dbpass = ; //Database Password
  $CFG->dbpersist = false;
  $CFG->prefix = 'mdl_'; //Table Prefix
  
  $CFG->wwwroot = 'http://localhost/moodle'; //Location where moodle is accessed
  $CFG->dirroot = 'C:\wwwroot\moodle'; //Directory of Moodle
  $CFG->dataroot = 'C:\moodledata'; //Directory of moodledata folder (Created in step 1,
                                    //should be inaccessible through HTTP)
  $CFG->admin = 'admin';
  
  $CFG->directorypermissions = 00777; // try 02777 on a server in Safe Mode
  
  $CFG->unicodedb = true; // If 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.
  ?>

3. Go to your browser and type your moodle URL. You should get a screen that allows you to continue installation.


Alternative Installation method

If you have had any issues installing Moodle on Windows Vista this may be a solution for you. This was performed on a Vista Laptop running the Business Edition of Vista.

This solution uses XAMPP.


1. Go to this URL and download the latest version for Windows: http://download.moodle.org/windows/

2. This package includes XAMPP. I unzipped my package into C:\moodle19\ . Then start Moodle by going to C:\Moodle19\ and selecting "Start Moodle". After it completes, select "Stop Moodle".

One thing I have noted, after you do this the first time, is that it is easier on further occasions to create a shortcut on the desktop to "xampp-control" and another to "xampp_stop" (both in the server folder). You use xampp-control to start Apache and Mysql. You can use xampp_stop, should anything fall over (which occasionally does on my version.. Suspect it is a problem with Vista and Xampp??)

3. Start Apache and MySql and then go to your browser and type : http://127.0.0.1/ . Follow the online guide. (This is how I got around the permissions issue described in the instructions above).

4. Once setup is complete, modify the file located in Server/moodle called config.php. Adjust the line

   $CFG->wwwroot = 'http://127.0.0.1'

to

   $CFG->wwwroot = 'http://localhost'


5. I noted on my install the following: From the Xampp Control Panel, it shows a 'Directory Mismatch error'. This is fixed by using the guide provided here:

  All you have to do is open the registry editor (start ---> run ---> type regedit then
enter). Navigate to HKEY_LOCAL_MACHINE\SOFTWARE.    
  Right-click on SOFTWARE and Choose New ---> Key. Then, type XAMPP, then click OK. Navigate
to the XAMPP Key you just created, then right  click on the right column (anywhere in the
big white space) then again, New ---> String Value. Name it Install_Dir (probably case
sensitive!) then hit Enter. Double click this value and in the appropriate box, type the
path of your current XAMPP installation (E:\xampp in our case).  
  Close the registry and restart the Control Panel and you're ready to start. 

6. Finally, to ensure you site gets all the images, Site Administration -> Miscellaneous -> Experimental -> Smart Pix Search (Selected)


See also