Installing on Windows Vista

Installing on Windows Vista

by Mike Barker -
Number of replies: 51
Not sure why this happened, but I was trying to install the XAMPP package (1.8) on my new Vista laptop for personal use. Followed the readme directions, copied everything into a directory at C:\moodle\, ran setup_xampp, then apache_start, mysql_start, and started Firefox to visit http://localhost/ This worked for a couple of screens, but as soon as I told it where the data directory was, the next screen hung. Going nowhere slowly. Repeatably.

After confusing myself completely looking at comments here, I decided to take it slowly from the beginning again. Only this time I created the moodledata directory myself and used http://127.0.0.1 instead of localhost - and it all worked fine!

And with it all running, http://localhost does seem to do the right thing.

FWIW.
Mike

Average of ratings: -
In reply to Mike Barker

Re: Installing on Windows Vista

by George Herd -

Encoutered the same problem. Thanks, your tip worked! probably saved me a lot of time!

Thanks

George

In reply to George Herd

Re: Installing on Windows Vista

by Mark Jones -

How is Moodle running on Vista? I am looking to do the same for a development environment.

Thanks,

mark

In reply to Mark Jones

Re: Installing on Windows Vista

by Steven Ouellette -
I found this elsewhere in the discussions, but this is the first thread that comes up when I search for "Install Vista"

Vista interferes (I think) with the moodledata folder creation. So to install in Vista:
  1. Download XAMPP
  2. Install according to directions on your local drive in c:\xampp
Now verify XAMPP by turning on APACHE and MySQL, which you can do either by loading the XAMPP control panel or launching xampp_restart. Open your browser and type http://localhost. It will show the XAMPP home screen with lots of useful tools. You can use phpMyAdmin to create a blank database called moodle at this point by clicking on the menu on the left .

Now you need to put the Moodle files in the right place. Download the standard package (you won't need the Windows install package).
  1. Unpack the zip file into the c:\xampp\htdocs directory. You should have a folder c:\xampp\htdocs\moodle that has all the moodle files in it.
  2. Create a directory c:\xampp\htdocs\moodledata
  3. I am not sure if this step is needed, but it worked for me.
    1. Right-click on the folder moodledata, select Properties, then select the Security tab.
    2. Click on Everyone 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 - don't know if they need to be or not).
  4. Now you will have to modify the configuration file. Open Notepad or a similar text editor. Copy this and paste it into Notepad:
<?php /// Moodle Configuration File

unset($CFG);

$CFG->dbtype = 'mysql';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'root';
$CFG->dbpass = '';
$CFG->dbpersist = false;
$CFG->prefix = 'mdl_';

$CFG->wwwroot = 'http://localhost/moodle';
$CFG->dirroot = 'C:\xampp\htdocs\moodle';
$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.
?>

Now save the file in c:\xampp\htdocs\moodle\config.php If you are using Notepad, you will need to type this in the Save As box, "config.php" otherwise it will save it as config.php.txt which won't work.

Now you are ready to configure Moodle. Go to your browser and type: http://localhost/moodle and it should bring up the normal configuration screens. Everything from that point forward is like a normal installation.

I did this, and Moodle runs perfectly well in Vista.

I hope this helps you!
In reply to Steven Ouellette

Re: Installing on Windows Vista

by Pablo A. Rueda U. -

Hello Steven,

I just want to thank you for your post... it worked perfectly on my laptop... it took me time to organize everything... but finally it worked...

Thanks again...

Pablo Rueda

In reply to Steven Ouellette

Re: Installing on Windows Vista

by Rypke Procee -

Hi Steven,

I am Rypke from the Netherlands.

I just tried to install Moodle on my Vista machina. I did follow your advise but unfourtunatly I got a blank screen.

I am using Xamp 2.5 and Moodle 1.8.4

Do you have anny clue? Can you advise me on how to go on?

Thanks, Rypke

In reply to Rypke Procee

Re: Installing on Windows Vista

by Maria Eugenia Reyes -
Mike Barker, thank you. You really saved me a lot of time. I installed moodle in a server, but sometimes for presentations it is easier to show it using a laptop. So I was installing Moodle with Vista. Your tips were perfect.
In reply to Maria Eugenia Reyes

Re: Installing on Windows Vista

by atakan kesler -

i just installed moodle on sql server 2005 , vista , IIS 7.0

My steps :

1 . download and Install PHP 5.2.6 with ISAPI choice. you should load extensions which are curl, gd2,mssql,xml-rpc.

2. IIS , Handler Mappings : should set ISAPI dll(module mapping), and php (script mapping)

3. download freetds and move the file to the php/ext folder.

4. add the "php_dblib.dll" at the dynamic section of php.ini file

5. comment the mssql.dll in php.ini file.

6.[global]
     host = 127.0.0.1 ( for same machine)
     port = 1433
     client charset = UTF-8
     tds version = 7.0
     text size = 20971520

write these file called freetds.conf on the "c:\" folder

7. Create database on SqlServer 2005 SP2 and options ansi nulls=enabled and quoted = true

8. give the one user owner rights on the database.

9 . change the mssql.textsize and mssql.textlimit to 20971520 in php.ini

10. copy the php.ini to the windows folder and they should be same.

i made these steps and it worked.

In reply to Steven Ouellette

Re: Installing on Windows Vista

by Elie Khoury -

hey guys

i did all the steps u said.. but i received a message :

                            Error: Database conncetion failed

It is possible that the database is overloaded or otherwise not running properly.

The Site administrator should also check that the database details have been correctly specified in config.php

So guys what is the error ?? i guess its in my config.php file!

how can i fix it?

anyone can help

In reply to Steven Ouellette

Re: Installing on Windows Vista

by Aranganathan B -

Hello,

We have installed PHP on Vista sucessfully. We have installed Moodle on IIS in XP/Windows Server 2003. We have to know the procedure for installing Moodle on IIS 7.0 in Vista. Could you please give me the steps?

Thanks,

Aranganathan

arangu_mca@yahoo.co.in

In reply to Aranganathan B

Re: Installing on Windows Vista

by Mauno Korpelainen -

Aranganathan,

I haven't tested IIS7 but it can't be very different from installing moodle on IIS6 in XP/Windows 2003. Have you searched with google - for example http://www.maximumpcguides.com/how-to-create-a-windows-vista-iis7-mysql-php-web-server/ - how to set up a server with IIS7, PHP5 and MYSQL.

If you get this combination to run ok and create manually moodledata folder and give all users permission to read and write to moodledata folder (you may need both iis manager and changing permissions from properties of moodledata folder / security tab) , create a new user to mysql with all priviledges, create a new database, create manually config.php with correct values and go to the location of site with browser (http://webaddress_of_yoursite or from Vista itself http://localhost ) what else could be missing...

Have you read the documentation ( and the email I sent you on Friday )?

In reply to Steven Ouellette

Re: Installing on Windows Vista

by ilka ilka -
Hi!

Im trying to install Moodle on Vista, but I have some problems.
After setting up the database I get the following error:

Fatal error
: Call to undefined method domdocument::load() in C:\xampp\htdocs\moodle\lib\xmldb\classes\XMLDBFile.class.php on line 85

What am I doing wrong? I use xampp 1.6.7 with moodle1.9.1 and create my config file as described in this post(thanks!!! it's great help for installing on vista). So this works fine but after that I get this error.

Thanks!
Ilka
In reply to ilka ilka

Re: Installing on Windows Vista

by Richard Enison -
II,

My best guess is that you have an old version of the PHP extension for DOM.

RLE
In reply to Richard Enison

Re: Installing on Windows Vista

by karen obrien -
I have the same problem as Ilka. Sorry I'm a total newbie to PHP etc, if the problem is that I have an old version of the PHP extension for DOM, what would the solution be?
In reply to Steven Ouellette

Re: Installing on Windows Vista

by Josip Šarčević -
I can't install Moodle into a The Windows Vistu. Constantly lodgment installation with unification Moodla plus MySQL at an root plus password.
I have a message with Installer, yes we do does tie is unable realize or non MySQL create.
In reply to Steven Ouellette

Re: Installing on Windows Vista ***Thank you***

by Marko Maglic -
Thanks to your helpful solution, which is easy to realize and functions well (Even without rebooting etc. as suggested in other posts.), I can finally go ahead and customize my themes locally.

Thank you very much!
In reply to Steven Ouellette

Re: Installing on Windows Vista

by ehsan j -

I tried the steps but couldnt get moodle installaltion to work on my vista laptop, still get a blank page on firefox and HTTP 500 erro on IE7

1. installed xampp to c:\, ran xampp-control, started apache and mysql, http://localhost shows xampp home screen

2. downloaded and unzipped moodle-weekly-19 to c:\xampp\htdocs

3. create c:\xampp\htdocs\moodledata and set the full control permissions to all users

4. created config.php as said in c:\xampp\moodle

when I type http://localhost/moodle, I get nothing sad

please help!

In reply to ehsan j

Re: Installing on Windows Vista

by Richard Enison -
EJ,

The config.php file should not be in c:\xampp\moodle, but in c:\xampp\htdocs\moodle

RLE
In reply to Steven Ouellette

Re: Installing on Windows Vista

by Marie Norman -

Hi Steven,

I have just spent 3 days trying various suggestions for getting moodle running on my laptop under Vista.  It is now 1.34am Monday morning, and I have just finished your suggested way of installing.  IT HAS BEEN A GREAT SUCCESS. Thank you so much for your guidance.

I have just finished filling in the Administrator page and now I'm not sure where to go to next to start creating my courses, but I will carry on.  I think I'll leave it until tomorrow (or is that today?)

Thanks again

Marie

In reply to Steven Ouellette

Re: Installing on Windows Vista

by derek reddy -
Hi Steve
I have done the first 2 steps, downloaded & opened Apache & MySql.
But when I got to my browser-firefox- go to loacl host I get only a blank screen.

So what can I do now

Thanks

Des


In reply to Steven Ouellette

Re: Installing on Windows Vista

by derek reddy -
My problem seems to be that Apache doesn't start.
How do I fix that??

Thanks
In reply to derek reddy

Re: Installing on Windows Vista

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Do you have Skype, or something else, already running on port 80?
In reply to Steven Ouellette

Re: Installing on Windows Vista

by viral agrawal -
thank you so much..
it works for me now!!
I manually created config.php file.. and its working now..
thanks again
In reply to Steven Ouellette

Re: Installing on Windows Vista

by Alan Taylor -
Bless you Steven !!! For your clear and detailed instructions which even a software mug like me could follow.

My background is in infrastructure, not software. I'm running Windows 7 on our PC on which I wanted to load Moodle. I read a number of suggestions in the forums as to how to load Moodle on a Windows 7 machine (same as Vista). And I have spent hours and hours over the last few weeks unsuccessfully trying to load Moodle on the PC, have used much colourful (colorful in your language, Steven) language and wanted to toss the PC out our second floor window. I was becoming very frustrated.

Then I came across your post, followed your method closely and by God it worked immediately !! Hallelujah !! You're lucky, Steven, that you're in the US and I'm in Australia otherwise I'd kiss you on both cheeks.

Thanks again. Not everyone is a software/Linux/Apache(John Wayne film??)/SQL wiz.
In reply to Mike Barker

Re: Installing on Windows Vista

by Carlos Blanco -

Hi Mike,

It's sure nice that you stumbled on that solution. I wouldn't figure that one out. Saved me alot.

Carlos

In reply to Carlos Blanco

Re: Installing on Windows Vista

by Rob Tait -

Thnk you very much indeed. I had already tried creating a moodledata folder myself but it still didn't work. However, using 127.0.0.1 instead of localhost worked a treat.

Cheers, you've restored my faith in opensource programmes just in the nick of time ;)

Rob

In reply to Rob Tait

Re: Installing on Windows Vista

by Jonnie Elovsson -
Hi, all.

I have tried everything suggested here on my Vista machine.
Tried, retried, retried and tried again.
Used all tips and tricks from this thread and other threads in this forum.

Uninstalled XAMPP four times.
Removed everything Moodle-related from my machine four times.
I simply cannot get it to install properly.

This drives me crazy!!!

sad

Jonnie



In reply to Jonnie Elovsson

Re: Installing on Windows Vista

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi,

I have managed to get Moodle (1.9.2) working on Vista by setting compatibility of httpd.exe.

So, I am using the WAMP: http://sourceforge.net/projects/webdeveloper/ and then found the httpd.exe in the %installdir%/www/apache22/bin direcory, right click for properties and on the compatibility tab selected Windows XP SP2 for the compatibility mode and at the bottom ticked on 'Run this program as an administrator'. This allows httpd.exe to write to the file system as it sees fit.

I am only using my WAMP as a development system and therefore would not be happy with this solution on a production server without first pinning down things in the httpd.conf file etc. For which I am still learning.

I hope this solution works. Have a go with XAMPP as it will have httpd.exe too.

Cheers,

Gareth
In reply to Gareth J Barnard

Re: Installing on Windows Vista

by Jonnie Elovsson -
Hi all, I have now succesfully installed like this!

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

2. The downloade package includes XAMPP and Moodle.

  • Unzip the package - normally it unzips itself to "C:\xampp".
  • Start Moodle by going to "C:\xampp\htdocs" and select "Start Moodle". This will start the server and sql database that is necessary to run Moodle local. (Don´t be afraid when the black command window opens - it is just starting the server)
  • When this process is finished. Carry on to step 3.

3. Open your browser and type the url "http://127.0.0.1" and follow the instructions.
----------------------------------------------------------------------

That´s what I did, and it worked right away out of the box.
Apache started, SQL started...

...then I opened my browser (FF) and type "http://127.0.0.1" and the installation process of Moodle started with the first page with all checks green all the way to the creation of the database and database tables. Everything just went smooth as silk. I just followed the instructions on the pages.

If you run into problems, read this document for further assistance:
http://docs.moodle.org/en/Installing_Moodle_on_Windows_Vista

Jonnie
In reply to Gareth J Barnard

Re: Installing on Windows Vista

by Jatin Thakkar -
Hey,

I tried changing things in the config.php, even this method you mentioned, changing security settings for moodledata, it still gives me a blank page.

http://127.0.0.1/moodle/admin/index.php

same with 127.0.0.1 replaced with localhost

The installation went ok, there were just two PHP checks for OpenSSl and cURL libraries, the database got created, and then when installation finished after the license agreement, a blank page.

here are my settings for config.php

<?php /// Moodle Configuration File

unset($CFG);

$CFG->dbtype = 'mysql';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'root';
$CFG->dbpass = '';
$CFG->dbpersist = false;
$CFG->prefix = 'mdl1_';

$CFG->wwwroot = 'http://127.0.0.1/moodle';
$CFG->dirroot = 'C:\xampp\htdocs\moodle';
$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.
?>

everything is where it is supposed to be,and I have been using this same xampp on this machine for about a year now, it has wordpress, drupal, joomla and everything is working fine, apart from this problem with moodle.

I do have a dual boot system with XP, but i don't want to switch to XP just to work on moodle.

Anything I might have missed?

The moodledata directory has got some stuff in it, so am sure the system can write into it, its just not displaying anything!

Tested on Firefox 3.05 and IE 7

Thanks,

Jatin



In reply to Jatin Thakkar

Re: Installing on Windows Vista

by Richard Enison -
JT,

Can I assume that you have read the earlier posts in this thread, followed their links (like Installing Moodle on Windows Vista), and tried their suggestions? If not, ...

BTW I wouldn't exactly agree that everything is where it should be. Since your Moodle site is purely local, it probably doesn't matter. But on a "real" site (one that is serving other computers over the Internet), the moodledata folder shouldn't be under htdocs which, based on what you have said, is the web document root. It should be anywhere else, so that it is not accessible directly via web browsers, for security reasons. See Installing Moodle#Creating_the_data_directory. Also, on a real Moodle site, using root as the database username with no p/w would be a very bad idea.

RLE
In reply to Richard Enison

Re: Installing on Windows Vista

by Jatin Thakkar -
Hey,

I checked all the links, and made the changes, but it is still showing a blank page.

And I know about the risks with the database password, as well as location of moodledata, I had tried other locations for moodledata too, but to no avail. This is just a local installation for testing new themes, the schools already have moodle installed.

Anything I am missing?
In reply to Gareth J Barnard

Re: Installing on Windows Vista

by Marc Couture -
This worked for me (e.g. changing permissions and compatibility settings for the Apache daemon; I'm using Vista Ultimate, 32 bit version on a Dell Latitude D830 laptop), but only if I combined this approach with using http://127.0.0.1/moodle instead of http://localhost/moodle when calling the install from the WAMP console.

Many thanks!
In reply to Marc Couture

Re: Installing on Windows Vista

by Tony Knight -
Re: blank screen freeze after database auto build.
I went through all the steps in this and other threads all to no avail. After enabling php errors the following was shown:
Fatal error: Cannot redeclare domxml_new_doc() in C:\xampp\htdocs\moodle\auth\cas\CAS\domxml-php4-php5.php on line 52

The issue was corrected by commenting out the domxml extension in php.ini.

The system seems now to work.

(Vista Ultimate 32 bit, xampp, not bundled)
In reply to Mike Barker

Re: Installing on Windows Vista

by Hywel Green -
I'd just like to say that after quite a bit of messing around I followed these instructions to the letter and it WORKS!

http://docs.moodle.org/en/Installing_Moodle_on_Windows_Vista

Now please excuse me as I'm off on a journey..
In reply to Hywel Green

Re: Installing on Windows Vista

by Leonardo Mendes -
From a post started all the way back in 2007, a simple tip still works wonder. Why isn't this fixed or the tip put as mandatory somewhere I don't know. After spending 30minutes testing all parts of the install, looking at the settings, directories, permissions, config files.....simply using 127.0.0.1 instead of localhost did the trick.
I don't get it.
Average of ratings: Useful (1)
In reply to Leonardo Mendes

Re: Installing on Windows Vista

by John Brady -

I was lucky by comparison - only about 5 minutes of faffing about before I cut to the chase, scrolled to the end of the above posts, and read the above post on usging 127.0.0.1 instead of localhost, and voila!  Thanks Leonardo.  Some other things which I had previously done which, for all I know, might also be necessary:

I extracted the zip file to d:\moodle, then created an empty moodledata folder (i.e. d:\moodle\server\moodledata), and then changed the moodledata folder's security properties (right click the moodledata folder in My Computer) to allow Users every permission I could (i.e. all but 'special permission').  (I presume this would be a serious security flaw if I was attempting a production installation and didn't correct this.)

I had previously tried in a non-admin vista login account, including running start moodle.exe and stop moodle.exe a couple of times, then a reboot, then a start and a stop in an admin vista account, and running in Firefox 3.5 and IE 8.  (The successful combination of versions was moodle 1.9.6+, Firefox 3.5, Vista Service Pack 1 + current upgrades.)

I once heard that American Indians used to make penicillin by putting the bark of a particular tree into rainwater in the stump of another tree at the full moon accompanied by certain prayers.  Turns out the full moon and the prayers weren't actually necessary. 

Similarly I suspect that creating moodledata and giving it additional permissions is the only essential additional step, although I've previously found that WAMPs on vista work better when run on an admin account.  Come to think of it, I wonder if all I had to do was unzip it and first run it on a vista admin account? (I think people above have had it work first go?)  I wonder if initially attempting the install on a non-admin account set up the parent folder with inadequate permissions, especially given that I was unzipping it to somewhere outside of My Documents

In reply to John Brady

Re: Installing on Windows Vista

by Pete Jones -
Hi John

I'm on my fourth attempt to download moodle onto a vista operating system; I've worked through all of the suggestions in this forum, including downloading the complete package and the standard apackage and Xampp separately.

I've also tried the permissions thing on the moodledata folder.

Nothing but frustration so far.

I'm now trying again with the complete package (i.e. moodle with xampp, etc.) and I think the problem is to do with where I'm extracting the files to.

I notice that you extracted them to d:/moodle.

How can I extract the files to somewhere other than C:/Users/Administration/Documents/moodle197?

On my laptop D:/ relates to the disc drive, and when I try to unzip the files there, it prompts me to insert a disk.

Thanks,

Pete


In reply to Pete Jones

Re: Installing on Windows Vista

by Pete Jones -
Forget that last post. I have success!

I'm not sure what I did differently - it may have been using http://127.0.0.01 rather than localhost.

Anyway, I'm up and running after a grand total of about 10 hours.

Very happy.

Pete
In reply to Mike Barker

Re: Installing on Windows Vista

by Bemoi Georges -
i get this error, i use windows 7

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\moodle\lib\pagelib.php on line 67
A server error that affects your login session was detected. Please login again or restart your browser.
In reply to Bemoi Georges

Re: Installing on Windows Vista

by James Jameson -
Hello Bemoi
>Try this thread for setting Moodle up on Windows 7:
>You can set up Moodle on Win7 by following the install instructions described in the training video at http://www.lynda.com/home/DisplayCourseN.aspx?lpk2=47547,  and then navigate to the Moodle for teachers hyperlink.

James.

In reply to Mike Barker

Re: Installing on Windows Vista

by Sofia Teles -

Thanks Mike,

After a couple of days killing myself trying to install it, you advice was a blessing :D

Average of ratings: Useful (1)
In reply to Mike Barker

Re: Installing on Windows Vista

by Isaac Moshe -

Mike - thanks a million for this post! I know it was over 3 years ago but I have spent the past 48 hours trying to set up Moodle on Vista and - having followed almost every other post - I finally found the above which worked immediately.

I can finally sleep...!! smile

LP

Ps. Just out of interest what is the 127.0.0.1 and why does this work?

In reply to Isaac Moshe

Re: Installing on Windows Vista

by Gill Rembert -

>Ps. Just out of interest what is the 127.0.0.1 and why does this work?

This IP addfress is the address for your machine and is know in technical terms as the "loop-back address".  It is also know as "localhost".  In the grand scheme of things, this address was set aside as an address for your local machine and is used when you you need to get to your machine through an IP address.

Average of ratings: Useful (1)
In reply to Gill Rembert

Re: Installing on Windows Vista

by Isaac Moshe -

Thanks Gill - good to know.

Unfortunately, for some unknown reason, the solution has now stopped working and I cannot access my Moodle using localhost or the IP address. As far as I know I didn't do anything to bring about the sudden change but I am now getting the following error message:

"Oops! Google Chrome could not connect to 127.0.0.1" in Chrome

"Internet Explorer cannot display the webpage" in IE

and similar error message in other browsers (eg Firefox, etc)

Any idea why this might be - or what I can do to go back to earlier today when it suddenly started working?

Help much appreciated!

Thanks smile