...

View Full Version : File or directory cannot be found



kcting
03-29-2010, 06:19 PM
Can anybody help to solve this error? Thank you.

<?php /// Moodle Configuration File

unset($CFG);

$CFG->dbtype = 'mysql';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'xxx';
$CFG->dbpass = 'ti';
$CFG->dbpersist = false;
$CFG->prefix = 'mdl_';

$CFG->wwwroot = 'http://localhost/moodle';
$CFG->dirroot = 'D:\xampp\htdocs\moodle';
$CFG->dataroot = 'D:\xampp\moodledata';
$CFG->admin = 'admin';

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

$CFG->passwordsaltmain = '&;Zl(~,Ay9#[w[=%';

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




Warning: main(D:\xampp\htdocs\moodle/lib/setup.php): failed to open stream: No such file or directory in /Users/student/ting/Sites/xampp/moodle/config.php on line 22

Fatal error: main(): Failed opening required 'D:\xampp\htdocs\moodle/lib/setup.php' (include_path='.:/Applications/xampp/xamppfiles/lib/php') in /Users/student/ting/Sites/xampp/moodle/config.php on line 22

Fumigator
03-29-2010, 08:09 PM
Why are you putting in an absolute directory reference? Apache is not going to understand that. You should be going back to the root of your webserver, and no further up than that. (Your root is "/htdocs")

It appears in your case your dirroot should be "/moodle", and I don't think you should set up your file structure so that you have to go up higher than htdocs. In other words, you need to store your moodledata directory below htdocs, not above or alongside it.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum