1.5.1 install setup hangs on Site Settings

1.5.1 install setup hangs on Site Settings

by James Fay -
Number of replies: 6
Just installed 1.5.1 on Fedore Core 3 and am a newbie to Moodle.

Followed 'Step by Step Instructions for RedHat'.

Calling it up in browser brings up the admin setup which hangs on the page called 'Site Settings.' Here I type in server name and click save. Then comes back with same 'Site Settings' screen, but empty again, and I can't get out of this.

Help!

James Fay, Annapolis, MD


Average of ratings: -
In reply to James Fay

Re: 1.5.1 install setup hangs on Site Settings

by Mark Pearson -
I realise that this is not a great deal of help, but my installation (Mac OS-X server 'tiger', Moodle 1.5+, and postgres db) is having exactly the same problem.

Here's what I think is going on:

When Moodle starts up it looks in config.php. My version has a line at the bottom:

require_once("$CFG->dirroot/lib/setup.php");

So setup.php is being run every time Moodle starts. Somewhere in this process site.php must be called but I am not sure from whence it calleth from. Site.php loads site.html but here again a cursory look at the php code did not reveal to me what file was written out upon Save (implying a dir permissions issue), although it may be that the info is written into the database and so it could be a database issue. Also, I'm not sure what log file to look at to suss the problem further.

But it's evident that config.php should be rewritten when setup.php runs to completion and so something is inhibiting this process.

I have searched the proverbial fora but found nothing else relevant. Am currently working to suss this problem out and will post result here.

Cheers

MarkP
In reply to Mark Pearson

Re: 1.5.1 install setup hangs on Site Settings

by Mark Pearson -
I looked again in config.php and found this line
$CFG->dbhost    = 'user=\'moodle\' password=\'\' dbname=\'moodle\'';

Opon checking with phpPgAdmin I realised that the user was actually called 'moodleuser' in the database so I changed the user and password:

$CFG->dbhost    = 'user=\'moodleuser\' password=\'ManorBi3r\' dbname=\'moodle\'';

I then restarted the moodle server and it progressed, but now there's a *ton* of database errors:

 
 

(postgres7): DELETE FROM mdl_log_display WHERE module = 'user'  
-1: ERROR: permission denied for relation mdl_log_display
      
 



etc etc
and all the create tables and alter tables fail to commit.

But then right at the bottom of the page:

Current release information
 
 
 

Moodle 1.5.1

ERROR: Could not update release version in database!!

So, this is how far *I've* got smile

Mark
In reply to Mark Pearson

Re: 1.5.1 install setup hangs on Site Settings

by Mark Pearson -
Did a search for : "Could not update release version in database" and got :
http://moodle.org/mod/forum/discuss.php?d=23479#119310

but not much help there. Howard Miller suggested checking Apache & mysql error logs but I don't know what the apache error is called on OS-X server so it's rather difficult to find!

But I did run phpPgAdmin and I set the moodleuser user to CreateDB (no change) and then to superuser and Creatdb (which I'm sure is not right). So now the script runs and it gets me back to the Site Settings screen (site.php) which still does not save any settings!!

So I'm back to where I started. What fun wink

Here's the URL : http://ec281.lly.earlham.edu/moodle

Cheers

Mark
In reply to Mark Pearson

Re: 1.5.1 install setup hangs on Site Settings

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I'm quite sure the problem is simply that the database user you are using didn't have enough database permissions...
In reply to Mark Pearson

Re: 1.5.1 install setup hangs on Site Settings

by Mark Pearson -
I've returned from hols and have sussed out the issue (although I still don't really understand what caused it). Here's what I did:

Recall that the Moodle configuration process was hung (looping) at /admin/site.php.

  1. Firstly I checked moodle_data permissions (read/write access for apache user) and postgres db permissions (moodleuser set to 'superuser'). So I was fairly sure that it wasn't a database issue.
  2. Taking a squiz at site.php I realised that the function data_submitted was always returning false.
  3. I carried out the debug suggestions from Petr Skoda (http://moodle.org/mod/forum/discuss.php?d=27741#131484). ie:

    1/ check permissions of your moodledata directory
    2/ add $CFG->debug = 15; to config.php
    3/ comment out following from lib/setup.php
        error_reporting(0);  // Hide errors
  4. Now, after the form is completed there's an error message from lib/weblib.php:

    The form did not come from this page! 
    Referer = http://ec281.lly.earlham.edu/moodle/admin/site.php

    [of course, it *did* come from this page]

  5. I determined that in weblib.php the function match_referer was returning false probably because $goodreferer .NE. $referer for some reason. At this point I noticed that if CFG->secureforms was set to null then the $url match would just be ignored. So I edited  config.php to add:

    $CFG->secureforms = '';

    and that did the trick!

  6. Saved the edited config.php, restarted moodle in the browser which got back to admin/site.php, this time the data was accepted and I moved on.

Now I am going to try updating to v 1.5.2!

Mark
In reply to Mark Pearson

Re: 1.5.1 install setup hangs on Site Settings

by Dayron D -

I set Moodle (1.5.2) up on an IIS 6 server a week ago to test and had no problem. Today I set it up on a production server and got the same hangup on site settings. I tried your solution of :

$CFG->secureforms = '';

It did the trick as you said it did for you. I wonder why I dealt withthis on one IIS server and not the other. Oh well. It works.