General help

Service Unavailable error on login

This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Picture of Jon Lunn
Service Unavailable error on login

We are using Moodle as our chosen VLE for our college and have got to the stage of getting our students to log in.  We chose to use phpBB as our forums (sorry, didn't like the moodle forums look and feel) and got our students to login during a lesson.  The server groud to a halt as 50 students in two classes all tried to access the server.  We beefed up the RAM to 4Gb and PhPBB works a treat.

During creation of courses in Moodle I found certain section paricularly adding teachers to courses brought IIS down with the 'service unavailable' error up.  When I restart the service on the server it is fine.

We then moved on to Moodle expecting plain sailing and when students attempted to logon it brought IIS down and gave the 'service unavailable' error up.  When we restart the service on the server Moodle is fine, until multiple logons are attempted.

We use LDAP authentication to minimise admistration of user accounts which works fine when you log on one at a time.

Any thoughts please?

Average of ratings: -
Picture of Graeme Evans
Re: Service Unavailable error on login
### How to fix ###

After mucking about a bit, I tracked it down to this, Lines 97 to 111 in file moodle/course/teacher.php


/// Add a teacher if one is specified

if (!empty($_GET['add']) and confirm_sesskey()) {
if (! add_teacher($add, $course->id)) {
error("Could not add that teacher to this course!");

/// Remove a teacher if one is specified.

if (!empty($_GET['remove']) and confirm_sesskey()) {
if (! remove_teacher($remove, $course->id)) {
error("Could not remove that teacher from this course!");

Does some stuff with sesskey things.

After looking where it looks to get the confirm_sesskey() function i went to the config.php

In file moodle/config.php, line 20,

So in this file (I know, long follow) moodle/lib/setup.php
I uncommented lines 333 and 334

/// In VERY rare cases old PHP server bugs (it has been found on PHP 4.1.2 running
/// as a CGI under IIS on Windows) may require that you uncomment the following:

This worked for me.
Average of ratings: -