Troubleshooting config.php

Troubleshooting config.php

by David Sharpe -
Number of replies: 4
Hi,

I've run into problems while trying to set up moodle. I'm using the Moodle 1.9 complete package on Vista.

As mentioned in the installation notes, the installation stalled giving a blank page, I then used the instructions provided in the following post.

http://moodle.org/mod/forum/discuss.php?d=73852#p431703

I have created the moodledata directory and changed the permissions, and created my own config.php file. Initially I made some mistakes with the paths in the file diaroot and got error messages which allowed me to see what the problem was. I managed to fix these errors but now get the following message:

Error:
Database connection failed.
It is possible that the database is overloaded or otherwise not running properly.
The site administrator should also check that the database details have been correctly specified in config.php

I have no idea where the fault is now. Could anyone direct me to some information on how to troubleshoot this problem?

Thanks in advance,

Dave
Average of ratings: -
In reply to David Sharpe

Re: Troubleshooting config.php

by Jeffery Watkins -
Do you have the correct information for the database in the config.php file? DBName, username and password?

I'd start there.

Jeff
In reply to David Sharpe

Re: Troubleshooting config.php

by Richard Enison -
In reply to Richard Enison

Re: Troubleshooting config.php

by David Sharpe -
Okay, as I was only following the proceedure that I saw in the posting:

http://moodle.org/mod/forum/discuss.php?d=73852#p431703

I have only changed the values for dirroot and dataroot. So this is the contents of my config.php file. Can anyone tell me, are there any other values that are system specific and need changing??

Thanks,

Dave


<?php /// Moodle Configuration File

unset($CFG);

$CFG->dbtype = 'mysql'; //Database Type
$CFG->dbhost = 'localhost'; //Database Host
$CFG->dbname = 'moodle'; //Database Name
$CFG->dbuser = 'root'; //Database User
$CFG->dbpass = ''; //Database Password
$CFG->dbpersist = false;
$CFG->prefix = 'mdl_'; //Table Prefix

$CFG->wwwroot = 'http://localhost/moodle'; //Location where moodle is accessed
$CFG->dirroot = 'C:\moodlep\server\moodle'; //Directory of Moodle
$CFG->dataroot = 'C:\moodlep\server\moodledata'; //Directory of moodledata folder (Created in step 1, Should be unaccessible through HTTP)
$CFG->admin = 'admin';

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

$CFG->unicodedb = true; // If Database is utf8

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.
?>
In reply to David Sharpe

Re: Troubleshooting config.php

by David Sharpe -
I suspect that the glitch that prevents the windows installer from working on vista, has prevented the creation of a moodle database. Is it possible to manually do this using the software provided in the complete windows package download.

Cheers,

Dave