Moodle on Windows 7, installation stops at install.php through web browser

Moodle on Windows 7, installation stops at install.php through web browser

by andy giles -
Number of replies: 14
I have folllowed all the instructions and go through my web browser typing localhost, follow the options and decide on where files will be stored etc, click next. install.php is down the bottom and looks like its loading, this completes with a white screen and no change. any ideas? I am fairly computer literate.
Average of ratings: -
In reply to andy giles

Re: Moodle on Windows 7, installation stops at install.php through web browser

by Christian Melby -

This solution worked for me when trying to install on my laptop, after hours and hours and hours of trying various solutions:

Note: when I tried to access localhost from the browser URL line I got an IIS screen (looks like a web manager related to something else...) so I had to follow the directions under SPECIAL INSTRUCTIONS IF IIS IS ALREADY INSTALLED
below. If you have the same issue, follow the directions between asterisks, and then type in 127.0.0.1:7070 or localhost:7070 instead of 127.0.0.1 or localhost

Now the installation method that worked for me:

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??)

****************************************************************
SPECIAL INSTRUCTIONS IF IIS IS ALREADY INSTALLED
By default IIS and Apache run on the same port ( 80 or 8080) so you could try reconfiguring the port Apache will listen  to as 7070 or something similar( you do this by going to the httpd.conf file located in your apache/conf directory here you edit the configuration directive tagged Listen to Listen  7070.Please be sure you know what you are doing before you mess around with this.

You can then launch the Moodle app by typing http://localhost:7070 OR 127.0.0.1:7070 in your web browser
****************************************************************

3. Start Apache and MySql (I WENT INTO THE \APACHE DIRECTORY AND STARTED SOMETHING LIKE STARTAPACHE.BAT AND THEN INTO \MYSQL DIRECTORY AND STARTED SOMETHING LIKE STARTMYSQL.BAT) and then go to your browser and type : http://127.0.0.1/ . (REMEMBER IT IS 127.0.0.1:7070 IF YOU NEEDED TO FOLLOW THE ASTERISKED DIRECTIONS ABOVE). Follow the online guide. (This is how I got around the permissions issue described in the instructions above).

THIS IS WHERE I COULD STOP. I DIDN'T NEED TO FOLLOW THE DIRECTIONS BELOW.

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)

In reply to andy giles

Re: Moodle on Windows 7, installation stops at install.php through web browser

by Jason Jolaoso -

Hello Andy,

Just a couple of questions to be sure we are on the same page

1. Are you using a XAMPP setup( Apache, Mysql , PHP)?

2. If the answer is yes , then you need to be sure that you eneted the right details/parameters during installation - It's usually better to use an IP address ( 127.0.0.1 or something similar) during configuration. Also you might want to make sure that the moodledata folder has the appropraite permissions ( do this manually) after unziping your package. Also make sure the moodle DB is created and set to UTF-8 accordingly.

3. Lastly,If you are really sure that all your pre-requisites are up and running ( i.e php and mysql) and you still cant forge ahead, then we can roll back to old-fashoined step by step debugging.

Let me know how it goes.

Regards

Jason

In reply to Jason Jolaoso

Re: Moodle on Windows 7, installation stops at install.php through web browser

by Parthasarthy Murugesan -

Hi,

I too face same problem (http://moodle.org/mod/forum/discuss.php?d=145492#p635466).

I'm sure everything runs properly - php, mysql.

This problem occured when I removed 2.0 and tried 1.9.5 / 1.9.7.

After the blank screen, no config.php is created in the folder.

regards

Parthasarathy

In reply to Jason Jolaoso

Re: Moodle on Windows 7, installation stops at install.php through web browser

by andy giles -

I'm not sure, I have downloaded the version for windows, 1.9 I think. is this XAMPP? It says its working fine until it gets to the install.php so I'm not sure what to do. Also not sure how you do the things you have mentioned if I am using an XAMPP.

Thanks for your help, I look forward to your reply.

In reply to andy giles

Re: Moodle on Windows 7, installation stops at install.php through web browser

by Parthasarthy Murugesan -

Oh! I solved the issue it's very simple. The problem is Vista's permission issue. http://docs.moodle.org/en/Installing_Moodle_on_Windows_Vista

Manually added config.php, changed 'dirroot' and 'dataroot' accordingly.

(i think this problem is solved in 2.0, as i didn't face this issue).

Thanks for your replies.

Regards
Parthasarathy

In reply to Parthasarthy Murugesan

Re: Moodle on Windows 7, installation stops at install.php through web browser

by andy giles -
How do you manually add config.php and what do you mean by change dirroot and dataroot?
In reply to andy giles

Re: Moodle on Windows 7, installation stops at install.php through web browser

by HJWUCGA INC. -

the config.php is a file created by moodle after you successfully go through the install process.

The "dirroot" and "dataroot" are parameters/variables that point to where your site and your moodledata are located on your computer. These values should automatically be assigned and created - again through the install process.

Here is a sample (assuming you're using MySQL):

=======================

<?php /// Moodle Configuration File

unset($CFG);

$CFG->dbtype = 'mysql';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'yourMoodleDBName';
$CFG->dbuser = 'yourMoodleDBUsername';
$CFG->dbpass = 'yourMoodleDBUsernamePassword';
$CFG->dbpersist = false;
$CFG->prefix = 'mdl_';

$CFG->wwwroot = 'http://www.yourmoodlewebsite.com';
$CFG->dirroot = 'Drive:\the\location\of\your\moodle\site';
$CFG->dataroot = 'Drive:\the\location\of\your\moodle\data\also\called\moodledata';
$CFG->admin = 'yourMoodleadminUserName';

$CFG->directorypermissions = 00777; // try 02777 on a server in Safe Mode

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.
?>

=======================


good luck ... and remember to make this a read only / secure the file's access through permission


In reply to HJWUCGA INC.

Re: Moodle on Windows 7, installation stops at install.php through web browser

by andy giles -
ok well it seems like I haven't installed correctly as it stops at install.php and i cant find any of the above files you say will be created or the config file. any ideas? i dont have a website to load it to as yet does this matter? or any content.
In reply to andy giles

Re: Moodle on Windows 7, installation stops at install.php through web browser

by Parthasarthy Murugesan -

Actually, the config.php should be automatically created. But now, due to permission issues in windows, this file couldn't be created.

So we have to create such a file. You simple put the file I attached here into the moodle folder, and change the username, directory path, etc.

Then run install.php.

In reply to Parthasarthy Murugesan

Re: Moodle on Windows 7, installation stops at install.php through web browser

by andy giles -

I have added the file to the moodle file but I dont know where to look for the other things you said to change e.g. username, directory path etc. I have typed local host into my browser to see if it would work and got this message - Parse error: parse error in C:\Program Files\MoodleWindowsInstaller-latest-19\server\moodle\config.php on line 16

Does that shed any light?

In reply to andy giles

Re: Moodle on Windows 7, installation stops at install.php through web browser

by Steve Hannah -

I had the same problem on Win7 x64 - all I got was a blank screen at install.php and after trying everything else I used http://127.0.0.1 instead of http://localhost and everything went perfect.

In reply to Steve Hannah

Re: Moodle on Windows 7, installation stops at install.php through web browser

by Alain Bérard -

Same problem for me,it's new, because with 2.1 beta it's works.

Alain From Toulouse, France

In reply to andy giles

Re: Moodle on Windows 7, installation stops at install.php through web browser

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Andy, this happened to me and I was so annoyed...after everything working OK. However, I just refreshed the screen and the Admin page appeared.

Knowing how Moodle works is half the battle, as I had been having problems with it timing out in previous versions, but in a new install you can't set debuggin on until you have it set up. Catch22 smile

Hopefully you have this sorted out now? By the way I used WAMP server and that was a doddle to set up on Win7...much easier than I was lead to believe.

HTH

Mary