Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    File or directory cannot be found

    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

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •