Error message - Notice: Undefined property: dirroot in ....

Error message - Notice: Undefined property: dirroot in ....

by Ian Davis -
Number of replies: 4

Could any kind soul help me with this installation problem?

 

I am installing moodle on my PC which runs under Windows 98. I have followed the instructions to the letter i.e. used EasyPHP, set up a database and modified the config.php file using Wordpad.

 

The main information in the config.php is very similar to that given in the instructions:

 

$CFG->dbtype = 'mysql';

$CFG->dbhost = 'localhost';

$CFG->dbname = 'moodle';

$CFG->dbuser = 'root';

$CFG->dbpass = '';

$CFG->dbpersist = true;

$CFG->prefix = 'mdl_';

$CFG->wwwroot   = 'http://localhost/moodle';

$CFG->dirroot = 'C\Program Files\EasyPHP1-7\www\moodle';

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

 

When I try to complete the installation by typing http://localhost/moodle/admin/ into the address bar of Internet explorer, I get the following messages:

 

 

Notice: Undefined property: dirroot in c:\program files\easyphp1-7\www\moodle\config.php on line 170

Notice: Undefined property: dirroot in c:\program files\easyphp1-7\www\moodle\config.php on line 173

Error detected in config.php


Notice: Undefined property: dirroot in c:\program files\easyphp1-7\www\moodle\config.php on line 178

Error in: $CFG->dirroot = '';

Try this: $CFG->dirroot = 'c:\program files\easyphp1-7\www\moodle';

 

So the strange thing is, it doesnt seem to recognise what comes after the = sign in the assignment statement: $CFG->dirroot = 'C\Program Files\EasyPHP1-7\www\moodle';

 

The fact that the dirroot property is undefined causes the error trap at the bottom of the config.php file to kick in.

 

I have tried the following:

 

1.    Retyping the above line and others many times (thought there might have been a hidden character interfering).

2.    Using double quotes rather than single quotes.

3.    Going through the complete installation again.

4.    Other cunning ploys that Ive now forgotten since Ive been working at this problem all day.

5.    Jumping up and down in frustration.

 

Anyone out there got any ideas?

 

Cheers

 

Ian Davis

Average of ratings: -
In reply to Ian Davis

Re: Error message - Notice: Undefined property: dirroot in ....

by W Page -
Hi Ian,

You have in the "config.php" file,
$CFG->dirroot = 'C\Program Files\EasyPHP1-7\www\moodle';

It should be,
$CFG->dirroot = 'C:\Program Files\EasyPHP1-7\www\moodle';

The ":" is missing.

Hope this helps.

WP1
In reply to W Page

Re: Error message - Notice: Undefined property: dirroot in ....

by Ian Davis -

Howdee W page

Thanks for your comment on the problem. I had another look at the offending dirroot variable. In fact I did have the colon in the original config.php file. However, I didn't have the surrounding apostrophes. Whoops! At what stage they got lost, I don't know. It appears to be working now.

I think I had spent so many hours looking at the same line I couldn't see the wood for the trees. I've done some programming so I ought to know better ...

In any case, if it wasn't for you getting me thinking about faulty syntax, I probably would have wasted  another day on the problem. So thanks again.

Cheers

Ian D

In reply to Ian Davis

Re: Error message - Notice: Undefined property: dirroot in ....

by W Page -
You are certainly welcome.  Glad it worked out.

WP1
In reply to W Page

Re: Error message - Notice: Undefined property: dirroot in ....

by Jim Woulfe -
I have Ian's problem too, with the error message below.

I've checked the quotation marks, and tried upper case / lower case, removing the examples for other operating systems. I've even overwritten the config-dist.php file from a new extraction of the zip file and started again.

Like Ian, I've spent a whole day on this - the urge to hurl the computer across the room is getting stronger ...

Any suggestions, anyone?


Notice
: Undefined property: dirroot in c:\program files\easyphp1-8\www\moodle\config.php on line 272

Notice: Undefined property: dirroot in c:\program files\easyphp1-8\www\moodle\config.php on line 275

Error detected in config.php


Notice: Undefined property: dirroot in c:\program files\easyphp1-8\www\moodle\config.php on line 280

Error in: $CFG->dirroot = '';

Try this: $CFG->dirroot = 'c:\program files\easyphp1-8\www\moodle';