Configuration problems?

Configuration problems?

by Vernon Williams -
Number of replies: 8

Hi all,

Perhaps someone will be good enough to help me with this problem.

Until recently I had a technician that looked after the technical side of moodle for me but he has recently gone on to pastures new.  We run Moodle on a Windows Server (2003) internally.  We also give external access to our pupils via http://learn.cityboys.org.uk. Today I have upgraded to Moodle 1.7.2+.  However, while all seems to have installed, I have a problem:

The main page displays (although I have lost all the images). However, following logon I get 'The page cannot be found'.  I have noticed that the URL reads http://firefly/moodle/moodle/login//moodle/ (firefly is our internal server).  I have looked at older versions of the config.php file and checked it against the new installation - all seems well. Config.php below:

<?php  /// Moodle Configuration File

unset($CFG);

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

$CFG->wwwroot   = '\moodle';
$CFG->dirroot   = 'C:\Inetpub\wwwroot\moodle';
$CFG->dataroot  = 'C:\Inetpub/moodledata';
$CFG->admin     = 'admin';

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

Anyone any ideas with this.  I have tried changing the wwwroot line.  But cannot see why this is failing.

All help will be greatfully received!

K. V. Williams
The City of Portsmouth Boys School.

Average of ratings: -
In reply to Vernon Williams

Re: Configuration problems?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You should be able to use *exactly* the same config.php file (assuming nothing else has changed), if you still have it. If you do that and there is still a problem it is quite likely to be something else.

Your current wwwroot can't be right, but I'm sure you know that. It can't start / for example.

There are various ways of resolving this internal/external access. The *best* is probably using *trick* DNS settings but, again, the upgrade should not have made any difference.

Are you sure you didn't change anything else?
In reply to Howard Miller

Re: Configuration problems?

by Vernon Williams -

Thanks for the response Howard.

I have tried copying the config files from previouse installations, and still have the same problem.

In reply to Vernon Williams

Re: Configuration problems?

by Ken Wilson -

Hi Vernon

It's the $CFG->wwwroot variable that's the root cause of the problem. It needs to be set to

$CFG->wwwroot = 'http://learn.cityboys.org.uk/moodle';

You then add an address record in your internal DNS server for that domain - then you have access both internally and externally.

Also, it's a bad idea (security wise) to use root username to connect - use a specific moodle user (say moodleuser) as in the installation documents.

If you want specific steps on setting-up DNS on Windows, please post back.

Ken

In reply to Ken Wilson

Re: Configuration problems?

by Vernon Williams -

Thanks for the response Ken.

If i set $CFG->wwwroot = 'http://learn.cityboys.org.uk/moodle'; our internal links do not work - I am not sure why!

In reply to Ken Wilson

Re: Configuration problems?

by Vernon Williams -
Hi Ken,

We have now followed your instructions for setting up the internal DNS.

However, our problems still occur! I think it may be because of the following:

We host the site on an internal server. The external link points to 193.122.27.45 which is 'owned' by portsmouth city council, who then direct it to our internal server. So having followed the steps you emailed to me - we are still in the same boat I am sorry to say!

Have you any other ideas? Any help is gratefully appreciated.

Thanks again,

Vern.
In reply to Vernon Williams

Re: Configuration problems?

by Chris Lamb -

At a quick glance two things strike me as suspicious, both of them in the URL you see in your browser, http://firefly/moodle/moodle/login//moodle/ 

The first one is the "...moodle/moodle..." bit - are you sure you haven't misconfigured something to put 'moodle' in the path twice, when the path should really be http://firefly/moodle/login//moodle/ ?

The second one is the double-slash between 'login' and 'moodle' - it's unusual to have a double-slash anywhere in a URL (other than after the httpsmile and I'm wondering if that might be causing a problem for you.  The equivalent path to my Moodle installations only has a single slash after 'login'.  I'm also concerned that you have the name of your Moodle folder after the word 'login' as well - on mine it's ...moodlename/login/index.php.  You may have a misconfiguration somewhere in your config file which is putting the name of the moodle folder in where it shouldn't be.

HTH

Chris

In reply to Chris Lamb

Re: Configuration problems?

by Vernon Williams -
Thanks for all the help so far people - it is greatly appreciatted.

I now have it up and running in sorts. I can now get to the first page (main page that is) and get to the logon page. However, when I log in I get 'The web page cannot be found' The URL it is directing me to is http://193.122.27.45/moodle/login/index.php
(I am working from home at the moment). I have checked on the server and that file exists within the directory. Is that where it is supposed to go after log on?

Once again all help greatfully received!

Vern.