Jump to content

Recommended Posts

Posted

Guys, I need help!

 

Yesterday, while preparing my site for upgrading to moodle 2.0, I was looking at my enviroment variables, and I noticed that CURL wasn't installed. This is only a reccomendation in 1.9, but a requirement in 2.0. Anyway, after un-commenting extension=php_curl.dll in my php.ini, it still didn't work, and while googling around, the advice was that PHP 5.2.14 didn't handle CURL very well and that I should upgrade my PHP to 5.3.3.

 

So I removed PHP, which was installed in C:\Program Files\PHP, and following the 5.3.3 installation advice, installed the new version in C:\PHP (because it doesn't contain a space).

 

So I did that, and setup my new PHP.ini (attached) and restarted IIS, and went to phpinfo() which as you can see confirms the install has worked, but when I try and look at any of the moodle pages I get the error 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

 

Here is the contents on my config.php, which looks fine to me (password changed obviously):

 

------------------------------------------------------------------

<?php /// Moodle Configuration File

 

unset($CFG);

 

$CFG = new stdClass();$CFG->dbtype = 'mysql';

$CFG->dbhost = 'localhost';

$CFG->dbname = 'moodle';

$CFG->dbuser = 'moodleuser';

$CFG->dbpass = 'SecurePa55w0rd';

$CFG->dbpersist = false;

$CFG->prefix = 'mdl_';

 

$CFG->wwwroot = 'http://moodle.purbeck.dorset.sch.uk';

$CFG->dirroot = 'D:\IIS\inetpub\wwwroot';

$CFG->dataroot = 'D:\moodledata';

$CFG->admin = 'admin';

 

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

 

$CFG->passwordsaltmain = '{5Q]5?]BK.Hk,358~MTs,hXJqHJttN';

 

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

 

-------------------------------------------------------------------

 

Any advice? I am desperately pulling my hair out at the moment trying to get this going, but to no avail.

 

I am using MySQL, IIS 7, Server 2008 SP2, Moodle 1.9.9+

 

Thanks in advance for the help!

php.txt

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...