0 down vote favorite

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');
}

Can you tell me what I missing?I have spent 2 days on this and can't find a solutionБ

Member Avatar for LastMitch

Can you tell me what I missing?I have spent 2 days on this and can't find a solutionБ

@iisark

I don't see any issue with your index.php

Did you read closely to the errors?

I feel you didn't read it closely, it does give you the explanation you need to undo this error.

if (!defined('CAKE_CORE_INCLUDE_PATH')) {
    define('CAKE_CORE_INCLUDE_PATH', DS.'C:'.DS.'xampp'.DS.'htdocs'.DS.'mysite'.DS.'cakecore');
}

You have a leading 'DS' in the define statement. Try removing that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.