Config.php!!

Config.php!!

by lam chun lung -
Number of replies: 5

Hello everyone, after i finish the setting of config.php and run such program. I have such problem.

Parse error: parse error, unexpected T_VARIABLE in c:\program files\easyphp1-7\www\moodle\config.php on line 29

Fatal error: Call to undefined function: check_php_version() in c:\program files\easyphp1-7\www\moodle\admin\index.php on line 15

And here is my code of config.php

<?PHP // $Id: config-dist.php,v 1.36 2003/09/01 12:07:06 moodler Exp $

unset($CFG);  // Ignore this line

$CFG->dbtype    = 'mysql';       // mysql or postgres7 (for now)
$CFG->dbhost    = 'localhost';   // eg localhost or db.isp.com
$CFG->dbname    = 'moodle';      // database name, eg moodle
$CFG->dbuser    = 'root';        // your database username
$CFG->dbpass    = ";             // your database password

$CFG->dbpersist = true;          // Use persistent database connection?
                                 // (should be 'true' for 99% of sites)
$CFG->prefix    = 'mdl_';        // Prefix to use for all table names

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

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

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

$CFG->directorypermissions = 0777;

$CFG->admin = 'admin';

//=========================================================================
// ALL DONE!  To continue installation, visit your main page with a browser
//=========================================================================

if (file_exists("$CFG->dirroot/lib/setup.php"))  {       // Do not edit
    include_once("$CFG->dirroot/lib/setup.php");
} else {
    if ($CFG->dirroot == dirname(__FILE__)) {
        echo "<p>Could not find this file: $CFG->dirroot/lib/setup.php</p>";
        echo "<p>Are you sure all your files have been uploaded?</p>";
    } else {
        echo "<p>Error detected in config.php</p>";
        echo "<p>Error in: \$CFG->dirroot = '$CFG->dirroot';</p>";
        echo "<p>Try this: \$CFG->dirroot = '".dirname(__FILE__)."';</p>";
    }
    die;
}

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

What's problem?? Thank's anyone who concern such problem

Average of ratings: -
In reply to lam chun lung

Re: Config.php!!

by Floyd Collins -
First change $CFG->dirroot   = 'C:\Program Files\EasyPHP1-7\www\moodle';
to $CFG->dirroot   = 'c:\program files\easyphp1-7\www\moodle';

see what this does for you first.
In reply to Floyd Collins

Re: Config.php!!

by lam chun lung -

Thank for your reply, but the problem still exist.

Here is the error message

Parse error: parse error, unexpected T_VARIABLE in c:\program files\easyphp1-7\www\moodle\config.php on line 29

Fatal error: Call to undefined function: check_php_version() in c:\program files\easyphp1-7\www\moodle\admin\index.php on line 15

In reply to lam chun lung

Re: Config.php!!

by Floyd Collins -
Well the first error is something not right with your config.php, I suggest you redo your config.php file. The other error is saying that you dont have the right version of PHP. Did you get a message that said something like currently using version? If so what version are you running. You may also try and run phpinfo, you can get to this from the administration page of easyphp.

Please also give me more information, like have you got moodle to come up at all, if so how are you accessing the admin page? Are you just typing in the url or are you using the admin link in the lower right pain once you log in as admin ??


In reply to lam chun lung

Re: Config.php!!

by Ender Tunca -

did you solved it?

because i have completely same problem...

In reply to Ender Tunca

Re: Config.php!!

by Keith Stuart -
Yes I solved the problem.

Read Bentley's reply.

What are you running on your server. And how are you trying to set it up. I found that it is best to just unzip the file into place and then go to http://localhost/moodle on do the /moodle if you have a folder inside your www root. Now that i am looking at your code i see you are run easyphp. so i would start all over. install easyphp make your database an make you moodledata fold in the www dir. then unzip all your file in to the www. i would say put in the www root dont have it unzip in to a moodle folder inside the www. Then open your browse and got to http://localhost and set it all up. You dont have to config anything. Once you go to http://localhost it will take you through the setup. That should work. Also make sure you are on a 2000 computer xp will not run easyphp that good.

Keith