Localhost does not bring up Moodle front page in windows installation

Localhost does not bring up Moodle front page in windows installation

by Beth Ludwig -
Number of replies: 22
I am trying to install Moodle on my windows xp laptop. When I get to the third step and point the web browser to the localhost, or 127.0.0.1 - nothing appears in the window - so I am at a stand still. I'd be grateful for any assistance.
Average of ratings: -
In reply to Beth Ludwig

Re: Localhost does not bring up Moodle front page in windows installation

by Richard Enison -
In reply to Richard Enison

Re: Localhost does not bring up Moodle front page in windows installation

by Beth Ludwig -
Thanks for the info, Richard. I'm not sure how deep this support goes, but I'm in over my head. I don't know how to Check the dirroot variable in config.php. Is there somewhere that I can look for that information? Many thanks!
In reply to Beth Ludwig

Re: Localhost does not bring up Moodle front page in windows installation

by Richard Enison -
BL,

Yes. The place to look for it is config.php. This is, like all php files, just a text file. In this case it is located in the main (or root) Moodle folder (directory), usually called moodle.

In that file look for a line that begins

$CFG->dirroot =

What comes after the equal sign is a string of characters, in quotation marks, that represents the full pathname of the folder containing it, i.e., moodle. Since your server is a Windows system, this pathname will begin with a drive letter followed by a colon and a backslash. Just make sure the pathname is correct. It should be the pathname you gave for the Moodle folder when asked during the installation process, along with the pathname of the data folder and the URL of your Moodle web site. Those should be in config.php also, namely dataroot and wwwroot.

I mentioned that the file to look in is in the main Moodle folder because there are other files of the same name in other folders.

RLE


In reply to Richard Enison

Re: Localhost does not bring up Moodle front page in windows installation

by Beth Ludwig -
RLE,
I looked in the moodle folder and found a config-dist.php that had a whole lot of writing, but I can't seem to find a spot where it is looking for $CFG->dirroot =.
Am I in the wrong place?
Many thanks,
BL
In reply to Beth Ludwig

Re: Localhost does not bring up Moodle front page in windows installation

by Jeff Wood -
Hi Beth,

Might be a silly question but do you still have apache & mysql running? If not they need to be before you can access localhost. If you need to start them go to you local folder (c:/moodle/server) and run apache_start and mysql_start. If you get an error make sure you have run xampp_start.

Jeff
In reply to Jeff Wood

Re: Localhost does not bring up Moodle front page in windows installation

by Beth Ludwig -
Hello Jeff,
I had the Xampp-start file running, but I also started the apache and mysql, but unfortunately I am still not getting moodle installation page. I do appreciate your efforts. Thanks. Any other thoughts?

Beth
In reply to Beth Ludwig

Re: Localhost does not bring up Moodle front page in windows installation

by Richard Enison -
BL,

OK. So if Apache was running, that's not the reason for the problem. Now lets get back to the questions raised in your previous post:
  1. config-dist.php and config.php are two different files; so the answer to the question "Am I in the wrong place?" is yes.
  2. However, config-dist.php is a sample of what config.php should look like, with a whole lot of extra settings that are not normally used, just so you know what your options are. As such, it should and does contain a line beginning

    $CFG->dirroot =

    For example, in the Moodle on my PC (1.8.3), section 3 of the file looks like this:

    //=========================================================================
    // 3. SERVER FILES LOCATION
    //=========================================================================
    // Next, specify the full OS directory path to this same location
    // Make sure the upper/lower case is correct. Some examples:
    //
    // $CFG->dirroot = 'c:\program files\easyphp\www\moodle'; // Windows
    // $CFG->dirroot = '/var/www/html/moodle'; // Redhat Linux
    // $CFG->dirroot = '/home/example/public_html/moodle'; // Cpanel host

    $CFG->dirroot = '/home/example/public_html/moodle';

    The lines beginning // are comments. They are ignored when the file is interpreted by PHP. The last line above is the one I was referring to.
  3. It is also used to manually create config.php if the installation script doesn't work. You might need to do that eventually, but first things first.
  4. I gather you don't have a file named config.php in your main Moodle directory (the one containing config-dist.php). This is because you haven't gotten far enough in the installation process; it hasn't been created yet. When config.php does not exist, index.php (the default file in the main directory that is accessed when you don't specify a file name in your browser) detects this and redirects to install.php. This is basically a "wizard" that asks you a series of questions about the pathnames of important directories on your system, URL, database, and other parameters. It then uses the answers you give it to create config.php.
  5. So if you don't have config.php yet, there is no place to look for the dirroot line. Instead, make sure you give the wizard the right answer when it asks for the pathname to your Moodle directory. However, if the first page you get when you point your browser there is blank, you're not getting those questions. Which makes me wonder whether Apache is going to the right directory, and whether it has the right default file. If you are using the complete Windows package of Moodle, it should be. JW's questions assumed you are, and your answer to him seems to confirm that.
  6. The second suggestion in the FAQ, to check that PHP is configured to work with MySQL, should not be a problem, either. Just to make sure everything is as it should be, why not try phpinfo: create a text file called info.php as described here, and see what happens when you point your browser at it. If you get a (non-blank!) page, attach it to a post (it's probably too long to include in the post). If not, we'll have to take a close look at your Apache configuration.
  7. BTW, did you type http://localhost in your browser, or http://localhost/moodle? Because when you download the zip file of Moodle and extract it, the top level directory that gets extracted is moodle (where index.php, install.php, and config-dist.php are); everything else is inside that. The web document root (where localhost points to) is usually the parent directory of moodle. In the case of the Windows package, there is an extra level of directories, but it is still true that the web root is the parent directory of moodle. So unless you changed that, you need to browse to http://localhost/moodle
RLE
In reply to Richard Enison

Re: Localhost does not bring up Moodle front page in windows installation

by Beth Ludwig -
RLE,
I created phpinfo file and pointed my browser to it and it came up blank.
I also tried pointing the browser to http://localhost/moodle and http://localhostmoodle19 - which is what I renamed the server file. All came up blank.
I really appreciate all of your effort on my problem.
Beth
In reply to Beth Ludwig

Re: Localhost does not bring up Moodle front page in windows installation

by Jeff Wood -
Beth,

Moodle is worth it (once you get things up and running)... even if a little frustrating at times.

Sometimes when things go "south" for me I delete the moodle folder on my machine and start with a fresh download.

Did you use the "start moodle" .exe originally?

If you're still having troubles, I've attached a "how to" from an older version of moodle which might help.

Jeff

PS

These may help



http://video.google.ca/videoplay?docid=-2923364681084515082 (this is one of mine)

In reply to Jeff Wood

Re: Localhost does not bring up Moodle front page in windows installation

by Beth Ludwig -
Jeff,
Your install video was great - and affirming.
I downloaded the 1.9.2+ windows package. I actually did it twice, thinking I messed up the first time, by having it in another folder. Each time, things seem to go well until I try pointing my browser to the local host. I get a blank page and then I am stuck.
I did not use the "start moodle" .exe originally.
I downloaded - unzipped to my C drive - clicked on setup_xampp.bat - clicked on the Xampp-restart - I even started the Apache and MySQL - but when I point the browser to the localhost - I get a blank page.

Richard has posted something else for me to try - so I will try that now, but I plan on returning to your video to finish out. Thank you for sharing that with me.

Beth
In reply to Beth Ludwig

Re: Localhost does not bring up Moodle front page in windows installation

by Jeff Wood -
Beth,

I'm fresh out of ideas... but you are in good hands with Richard.

Good luck.

Jeff
In reply to Jeff Wood

Re: Localhost does not bring up Moodle front page in windows installation

by Beth Ludwig -
Jeff,
I appreciate the video. Thank you for your contribution.
Beth
In reply to Beth Ludwig

Re: Localhost does not bring up Moodle front page in windows installation

by Richard Enison -
BL,
  1. I just watched both of the videos JW's post mentions. I think his is better because he explains every step as he performs it. The other video has background music as the only soundtrack, and the only explanation is on the screen and excessively terse. The steps are performed so fast I couldn't even follow them, and I know how to do them! Unless you keep your handy dandy mouse pointer on the pause button, and your trigger finger on the mouse button, it will go by too quickly. Also, the screens are unreadable unless you run the video in full screen mode. And the title implies it's an installation, but it's really an upgrade.
  2. You said you tried http://localhost/moodle and http://localhost/moodle19 (I presume that's what you meant by http://localhostmoodle19; that leaving out the last slash was a typo), but you didn't say you had tried just http://localhost. I gathered from your original post that that's what you had been trying. I mention this because I noticed in JW's video that that's what he used. I use it on my Moodle on my PC also, but I didn't remember whether I always did or whether I had changed the Apache configuration to simplify the URL, because it's been a year since I installed it.
  3. If you have in fact tried all three URLs, then it would be of interest if you could post your Apache configuration file httpd.conf (it should be in a subfolder (subdirectory), called conf, of the Apache folder) as an attachment so we can see which folder is your web document root. That is the one localhost points to. Also, what is the full pathname of the folder into which you extracted the Moodle zip file?
RLE
In reply to Richard Enison

Re: Localhost does not bring up Moodle front page in windows installation

by Beth Ludwig -
RLE,
Thanks for hanging in here with me. I did try all three URLs.

I think I have attached the httpd.conf correctly.

Here is the full path name to the folder I extracted Moodle into: C:\Moodle19

Many thanks!
BL
In reply to Beth Ludwig

Re: Localhost does not bring up Moodle front page in windows installation

by Richard Enison -
BL,

The file you attached seems okay. It indicates that the web document root is C:\Moodle19\moodle. Is that the folder that contains index.php, install.php, and config-dist.php? If so, then the videos (and the pdf file attached to JW's post) are right that you should be using http://localhost. If info.php is there also, you should be able to run it by browsing to http://localhost/info.php. What happens when you try that?

Just to make sure that Apache is working correctly (make sure it is running!) why don't you try accessing the text file that should be in C:\Moodle19\moodle (README.txt) by typing this URL into your browser:

http://localhost/README.txt

What happens?

BTW I never have been able to get those XAMPP exe files (like Xampp-restart) to work right. I just use the bat files: xampp_setup (one time) and then apache_start and mysql_start before trying to run Moodle, as shown in JW's video. Also, I have found on my XP system, that after doing that and then rebooting my PC, from then on I don't have to use mysql_start anymore. MySQL (but not Apache) runs automatically as a service every time I boot up, although I never asked it to do that. If I try to run mysql_start, I get an error msg. that tells me it is already running. I have installed Moodle four times (different versions), and the same thing happens each time.

RLE
In reply to Richard Enison

Re: Localhost does not bring up Moodle front page in windows installation

by Beth Ludwig -
RLE,
C:\Moodle19\moodle is the folder that contains index.php, install.php, and config-dist.php.
I started Apache and MySQL and pointed the browser to http://localhost/info.php and http://localhost/README.txt and both came up blank.

Thanks again for your help.
BL
In reply to Beth Ludwig

Re: Localhost does not bring up Moodle front page in windows installation

by Richard Enison -
BL,

Well, now we know that it is an Apache problem. I have finished examining your httpd.conf file and everything looks okay; no big surprise there. The next step is to look at C:\Moodle19\apache\logs\error.log. This will tell us about any errors Apache reported.

I thank JW for his endorsement of me, although I am certainly not an expert on Apache. Perhaps this was in retaliation for my endorsement of his video.wink So if you would attach it, perhaps we can help you. If it does not exist, that is interesting. What about C:\Moodle19\apache\logs\access.log? That would be the next file I would be interested in looking at.

RLE
In reply to Richard Enison

Re: Localhost does not bring up Moodle front page in windows installation

by Beth Ludwig -
RLE,
This is my first experience with the Moodle community and I am totally impressed with the support. Thanks for hanging in here with me.

I tried to attach the error log, but received the message that no file was found. So I went to the moodle file and opened the apache error log and the access log and both of them were blank.

???
Beth
In reply to Beth Ludwig

Re: Localhost does not bring up Moodle front page in windows installation

by Richard Enison -
BL,

The fact that both log files exist but are empty would seem to indicate that Apache never really was running. I mean it tried; otherwise the files would not exist. But if it actually started up it would at least have created an entry indicating that it had.

Btw you don't have another application running that uses the same port (80) as Apache, such as IIS or Skype? Usually you get an error message on the screen right after you launch Apache when that happens, and then Apache shuts down.

RLE
In reply to Richard Enison

Re: Localhost does not bring up Moodle front page in windows installation

by Beth Ludwig -
RLE,
I believe you have discovered the problem. When I started Apache this time and read the whole screen instead of the last line which said to hit any key to continue - It told me that Apache was shutting down because there were no listening ports. Sorry.

Can I do something to fix this?
Many thanks!
Beth
In reply to Beth Ludwig

Re: Localhost does not bring up Moodle front page in windows installation

by Beth Ludwig -
RLE,

After, I thought for a minute, I turned Skype off and pointed the browser to the localhost and now I see the installation page! Yeah!

Thank you very much for your patience and your time.
BL
In reply to Richard Enison

Re: Localhost does not bring up Moodle front page in windows installation

by Jonathan Stearns -

I have the same problem.  My log as the following entries:

[Thu Mar 12 12:02:45 2009] [notice] Apache/2.2.11 (Win32) mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 configured -- resuming normal operations
[Thu Mar 12 12:02:45 2009] [notice] Server built: Dec 10 2008 00:10:06
[Thu Mar 12 12:02:45 2009] [notice] Parent: Created child process 6020
PHP Warning:  PHP Startup: Unable to load dynamic library 'H:\\server\\php\\ext\\php_pdf.dll' - The specified module could not be found.\r\n in Unknown on line 0
[Thu Mar 12 12:02:48 2009] [notice] Child 6020: Child process is running
[Thu Mar 12 12:02:48 2009] [notice] Child 6020: Acquired the start mutex.
[Thu Mar 12 12:02:48 2009] [notice] Child 6020: Starting 50 worker threads.
[Thu Mar 12 12:02:48 2009] [notice] Child 6020: Starting thread to listen on port 80.
[Thu Mar 12 12:02:48 2009] [notice] Child 6020: Starting thread to listen on port 443.

For some reason it cannot access the php_pdf.dll, which I verified is in that folder specified in the address in this above log.  I appreciate any help you can provide.

Jonathan