alvin567 Posted May 22, 2012 Share Posted May 22, 2012 Warning: include(cake\bootstrap.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\XXXXXXXXXX\app\webroot\index.php on line 86 Warning: include() [function.include]: Failed opening 'cake\bootstrap.php' for inclusion (include_path='C:\xampp\htdocs\lawsocscheme;C:\xampp\htdocs\lawsocscheme\app\;.;C:\xampp\php\PEAR') in C:\xampp\htdocs\lXXXXXXXXXX\app\webroot\index.php on line 86 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\XXXXXXXXXX\app\webroot\index.php on line 87 how can i solve this error? Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/ Share on other sites More sharing options...
Mahngiel Posted May 24, 2012 Share Posted May 24, 2012 I have a feeling you should check line 86. Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1348299 Share on other sites More sharing options...
jcombs_31 Posted May 27, 2012 Share Posted May 27, 2012 Did you modify the index.php? http://book.cakephp.org/1.3/en/view/915/Advanced-Installation Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1348998 Share on other sites More sharing options...
alvin567 Posted May 30, 2012 Author Share Posted May 30, 2012 is it helpful to download existing project from a systems to play with it? Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1349736 Share on other sites More sharing options...
alvin567 Posted May 31, 2012 Author Share Posted May 31, 2012 my line 86 is as follows if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { trigger_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 " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') { return; } else { $Dispatcher = new Dispatcher(); $Dispatcher->dispatch($url); } if (Configure::read() > 0) { echo "<!-- " . round(getMicrotime() - $TIME_START, 4) . "s -->"; } What could be the error? There are three constants that you'll need to edit: ROOT, APP_DIR, and CAKE_CORE_INCLUDE_PATH. ROOT should be set to the path of the directory that contains your app folder. APP_DIR should be set to the (base)name of your app folder. CAKE_CORE_INCLUDE_PATH should be set to the path of your CakePHP libraries folder. So which of this I probably will have to change? Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350071 Share on other sites More sharing options...
Mahngiel Posted June 1, 2012 Share Posted June 1, 2012 There are three constants that you'll need to edit: ROOT, APP_DIR, and CAKE_CORE_INCLUDE_PATH. ROOT should be set to the path of the directory that contains your app folder. APP_DIR should be set to the (base)name of your app folder. CAKE_CORE_INCLUDE_PATH should be set to the path of your CakePHP libraries folder. So which of this I probably will have to change? 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\XXXXXXXXXX\app\webroot\index.php on line 87 It's clearly telling you the problem. Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350325 Share on other sites More sharing options...
alvin567 Posted June 2, 2012 Author Share Posted June 2, 2012 Here's what the file setup looks like: /home /me /mysite <-- Used to be /cake_install/app /config /controllers /models /plugins /tmp /vendors /views index.php /var /www /mysite <-- Used to be /cake_install/app/webroot /css /files /img /js .htaccess css.php favicon.ico index.php /usr /lib /cake <-- Used to be /cake_install/cake /cake /config /docs /libs /scripts app_controller.php app_model.php basics.php bootstrap.php dispatcher.php /vendors what is expected of this? Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350482 Share on other sites More sharing options...
alvin567 Posted June 2, 2012 Author Share Posted June 2, 2012 I think this could solve this error? if (!defined('ROOT')) { define('ROOT', DS.'home'.DS.'me'); } if (!defined('APP_DIR')) { define ('APP_DIR', 'mysite'); } if (!defined('CAKE_CORE_INCLUDE_PATH')) { define('CAKE_CORE_INCLUDE_PATH', DS.'usr'.DS.'lib'.DS.'cake'); } because I saw this as follows, An example might help illustrate this better. Imagine that I wanted to set up Cake to work wit h the following setup: 1. I want my Cake libraries shared with other applications, and placed in /usr/lib/cake. 2. My Cake webroot directory needs to be /var/www/mysite/. 3. My application files will be stored in /home/me/mysite. Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350483 Share on other sites More sharing options...
alvin567 Posted June 2, 2012 Author Share Posted June 2, 2012 if (!defined('ROOT')) { define('ROOT', dirname(dirname(dirname(__FILE__)))); } /** * The actual directory name for the "app". * */ if (!defined('APP_DIR')) { define('APP_DIR', basename(dirname(dirname(__FILE__)))); } /** * The absolute path to the "cake" directory, WITHOUT a trailing DS. * */ if (!defined('CAKE_CORE_INCLUDE_PATH')) { define('CAKE_CORE_INCLUDE_PATH', ROOT); } define('CAKE_CORE_INCLUDE_PATH', 'C:' . DS . 'wamp' . DS . 'www' . DS . 'cake' . DS . 'lib'); Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350488 Share on other sites More sharing options...
smoseley Posted June 2, 2012 Share Posted June 2, 2012 Warning: include(cake\bootstrap.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\XXXXXXXXXX\app\webroot\index.php on line 86 define('CAKE_CORE_INCLUDE_PATH', 'C:' . DS . 'wamp' . DS . 'www' . DS . 'cake' . DS . 'lib'); Do you see what I see? Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350497 Share on other sites More sharing options...
alvin567 Posted June 2, 2012 Author Share Posted June 2, 2012 Ok I did spot it,now tell me,how can I resolve this error? Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350570 Share on other sites More sharing options...
smoseley Posted June 2, 2012 Share Posted June 2, 2012 change wamp to xampp Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350577 Share on other sites More sharing options...
alvin567 Posted June 2, 2012 Author Share Posted June 2, 2012 I've got another error in my application, how do I resolve this? Notice: Constant CAKE_CORE_INCLUDE_PATH already defined in /home/XXXXXX/public_html/lawsocscheme/app/webroot/index.php on line 63 Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350600 Share on other sites More sharing options...
smoseley Posted June 2, 2012 Share Posted June 2, 2012 remove this line: define('CAKE_CORE_INCLUDE_PATH', 'C:' . DS . 'wamp' . DS . 'www' . DS . 'cake' . DS . 'lib'); Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350607 Share on other sites More sharing options...
alvin567 Posted June 3, 2012 Author Share Posted June 3, 2012 How about this error? if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { trigger_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 " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } How do I handle this error? if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { trigger_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 " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350736 Share on other sites More sharing options...
alvin567 Posted June 3, 2012 Author Share Posted June 3, 2012 My project is not locally,it is from the web servers,how do I change the variables?any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350738 Share on other sites More sharing options...
smoseley Posted June 3, 2012 Share Posted June 3, 2012 Hold on.... do you know PHP at all? Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350741 Share on other sites More sharing options...
alvin567 Posted June 3, 2012 Author Share Posted June 3, 2012 I know php,but my skills is 3/5 only. Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350745 Share on other sites More sharing options...
alvin567 Posted June 3, 2012 Author Share Posted June 3, 2012 my root directory and the snippet of code I post is here. Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350751 Share on other sites More sharing options...
smoseley Posted June 3, 2012 Share Posted June 3, 2012 You realize you're not posting an error, right? You're posting code. Quote Link to comment https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350753 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.