CakePHP install on local pc (xampp) incorrect paths problem

Discussion in 'PHP' started by nasi, Sep 30, 2013.

  1. #1
    I have script built with an old version of CakePHP.The script works just fine on live servers but when i tried to install it on my pc (with XAMPP installed) igot problems...I have this error:

    Warning: include(cake\bootstrap.php): failed to open stream: No such file or directory in C:\xampp\htdocs\hack\index.php on line 76 Warning: include(): Failed opening 'cake\bootstrap.php' for inclusion (include_path='\C:\xampp\htdocs\hack\cakecore;\C:\xampp\htdocs\hack\cakeapp\;.;C:\xampp\php\PEAR') in C:\xampp\htdocs\hack\index.php on line 76 Fatal error: CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your \cake core directory and your \vendors root directory. in C:\xampp\htdocs\hack\index.php on line 77

    I'm pretty sure that this error is triggered by incorrect paths in index.php file,because if i made wrong path in index on the live website got exactly the same erorr.The problem is that i have no idea how to fix that paths.

    My site files are located in: C:\xampp\htdocs\mysite

    So here is how i made the paths on index.php file:

    /**
    * The full path to the directory which holds "app", WITHOUT a trailing DS.
    *
    */
    if (!defined('ROOT')) {
        define('ROOT', DS.'C:'.DS.'xampp'.DS.'htdocs'.DS.'mysite');
    }
    /**
    * The actual directory name for the "app".
    *
    */
    if (!defined('APP_DIR')) {
        define('APP_DIR', 'cakeapp');
    }
    /**
    * The absolute path to the "cake" directory, WITHOUT a trailing DS.
    *
    */
    if (!defined('CAKE_CORE_INCLUDE_PATH')) {
        define('CAKE_CORE_INCLUDE_PATH', DS.'C:'.DS.'xampp'.DS.'htdocs'.DS.'mysite'.DS.'cakecore');
    }
    Code (markup):
    Can you tell me what I missing?I have spent 2 days on this and can't find a solution?
     
    nasi, Sep 30, 2013 IP
  2. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #2
    on the first line of the error
    No such file or directory in C:\xampp\htdocs\hack\index.php on line 7

    your files are in C:\xampp\htdocs\hack

    or your config files points to C:\xampp\htdocs\hack
     
    bartolay13, Oct 1, 2013 IP