Config.php file help. PLEASE AND THANK YOU

Config.php file help. PLEASE AND THANK YOU

by Nikesh Hajari Mr. -
Number of replies: 13

Error detected in config.php

Error in: $CFG->dirroot = '/home/example/public_html/moodle';

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

it keeps on giving me this error even though i corrected the error in the config file and double checked the directory on my computer and checked for punctuation errors and found none. please help. i have attached the config file i made. i am new to mysql, apache and scripts. so please help me out.?

thanks

Average of ratings: -
In reply to Nikesh Hajari Mr.

Re: Config.php file help. PLEASE AND THANK YOU

by Jan Dierckx -

It seems you have attached all the configuration parameters at the end of the config.php. Your server never reaches the end of the file.

I think you better remove everything (also whitespaces) after the two lines that read

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

You can make all the necessary adaptations inside the config.php itself. Immediately after the lines that read:

// Make sure the upper/lower case is correct.  Some examples:
//
//    $CFG->dirroot = 'c:\program files\easyphp\www\moodle';    // Windows
//    $CFG->dirroot = '/var/www/html/moodle';     // Redhat Linux
//    $CFG->dirroot = '/home/example/public_html/moodle'; // Cpanel host

you can type...

$CFG->dirroot   =  etc...

I hope this can help...

BTW, if you post your config.php here, you'd better not include your database password and username. Leaving this out in the open on the internet is a security risk.

In reply to Jan Dierckx

Re: Config.php file help. PLEASE AND THANK YOU

by Nikesh Hajari Mr. -

read the original if you are just new to helping me with this please and thank you.

i tried that jan and it still doesn't work.

// 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.
$CFG->dbtype = 'mysql';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'root';
$CFG->dbpass = 'none';
$CFG->dbpersist = true;
$CFG->prefix = 'mdl_';
$CFG->wwwroot = 'http://localhost/moodle';
$CFG->dirroot = 'C:\Program Files\EasyPHP1-7\www\moodle';
$CFG->dataroot = 'C:\moodledata';
?>

that is waht my config file looks like. if you see any problems tell me. please and thank you

In reply to Nikesh Hajari Mr.

Re: Config.php file help. PLEASE AND THANK YOU

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
So is the file posted above your config.php file or isn't it??

If it *is* then, as was correctly pointed out to you, it will not work as all the settings are at the end. The code that would normally be at the end of the file is not seeing the correct settings. You should make the settings in the correct places. If it still doesn't work, then post the revised file and the errors that you are seeing.

Jan's advice to you is right - you are seeing the error because the settings are in the wrong place - you *must* correct this first.

You shouldn't really expect people to do a search and see if you have posted about the problem in some other thread smile
In reply to Howard Miller

Re: Config.php file help. PLEASE AND THANK YOU

by Nikesh Hajari Mr. -

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

$CFG->dbtype = 'mysql';

$CFG->dbhost = 'localhost';

$CFG->dbname = 'moodle';

$CFG->dbuser = 'root';

$CFG->dbpass = 'none';

$CFG->dbpersist = true;

$CFG->prefix = 'mdl_';

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

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

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

?>

that's my current config file. i don't know what you and jan meant. if you meant changing the order flip flopping it. it tried that and it didn't work. but i think i don't get what you guys are saying. please give me simple enligh and explain it to or show me an example config i  can use. please and thank you

In reply to Nikesh Hajari Mr.

Re: Config.php file help. PLEASE AND THANK YOU

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Is this *all* your config file. You *must* take the orginal config file (in config-dist.php) copy it to config.php and edit that. It contains extra code that you are missing here. Your config file won't work!!

You *must* use the proper config.php file.

If you still have problems then we can try and sort them out.
In reply to Howard Miller

Re: Config.php file help. PLEASE AND THANK YOU

by Nikesh Hajari Mr. -

i did copy the config-dist.php and then put this stuff in there. i jsut copied a secton of it and posted it up here. i read the docs on moodle and did it how they said and got this error. over and over. i am going to post my config.php here howard. so download it an dsee iff you can find anything wrong. PLEASE AND THANKYOU.

In reply to Nikesh Hajari Mr.

Re: Config.php file help. PLEASE AND THANK YOU

by Thomas Haynes -
Try this one.

Is your root password really the word 'none'?

This will only work from your machine because of the 'localhost'

Do us a favor and change the username and password for the database.
In reply to Thomas Haynes

Re: Config.php file help. PLEASE AND THANK YOU

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Just to be clear - you can't have the settings at the end. We have said this several times before. Thomas has fixed this in his version. Is this clear now? I don't know how else to explain it.

Again as Thomas says

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

is probably wrong. You should change to your machines DNS name or to its IP address. Localhost will only work on a stand-alone test machine.
In reply to Howard Miller

Re: Config.php file help. PLEASE AND THANK YOU

by Nikesh Hajari Mr. -
i still do't get it. im a newbie with all of this stuff. i tried putting this the configuration lines and in the beginning and and everything. i spent 4 hours last night trying to figure it out but i still can't. can one give me your config.php settings that works that i can use or explain where to put the stuff in the script.PLEASE AND THANK YOU.
In reply to Nikesh Hajari Mr.

Re: Config.php file help. PLEASE AND THANK YOU

by Tom Murdock -
Nikesh,

I would take the config.php file that Thomas made for you and make one change. The wwwroot variable that you have put there is probably wrong (as Howard has pointed out).

Do you have other files on your webserver? Let's say you had a "welcome to my website" html file in your www folder. To see that file, what location do you type in your browser? When you find this out, you'll want to change the wwwroot to read http://thebigmysteryaddress/moodle as your wwwroot variable.

Also, just for clarity, is this installation on a web server or are you just broadcasting to a local network?

best,
Tom
In reply to Tom Murdock

Re: Config.php file help. PLEASE AND THANK YOU

by Floyd Collins -
Ummm well if you want to start over,,,,, just uninstall EasyPHP and then grab my package at http://www.goohio.com/moodle
It will help you make the config.php in the setup web pages. Its easy its fast and it works.
In reply to Floyd Collins

Re: Config.php file help. PLEASE AND THANK YOU

by Nikesh Hajari Mr. -

THANKS ABSOULOUTLY FOR YOUR PACKAGE FLOYD. WORKS LIKE MAGIC. YOU ARE ONE HELL OF  A GENIUS. MAKES IT WASY FOR A STIMPLETIN LIKE ME TO USE, THANKS. WISH THERE WRE PACKAGES LIKE THAT, AND THANK YOU GUYS FOR TRYING TO HELP ME.

NIKESH HAJARI

In reply to Nikesh Hajari Mr.

Re: Config.php file help. PLEASE AND THANK YOU

by Floyd Collins -
Your welcome but I cant take all the credit, I had alot of help from Daryl Hawes. But all the same you are welcome from all of us!!