Jump to content

Archived

This topic is now archived and is closed to further replies.

alvin567

Cakephp Error

Recommended Posts

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?

Share this post


Link to post
Share on other sites

is it helpful to download existing project from a systems to play with it?

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

remove this line:

 

 

define('CAKE_CORE_INCLUDE_PATH', 'C:' . DS . 'wamp' . DS . 'www' .

DS . 'cake' . DS . 'lib');

Share this post


Link to post
Share on other sites

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

}

Share this post


Link to post
Share on other sites

My project is not locally,it is from the web servers,how do I change the variables?any ideas?

Share this post


Link to post
Share on other sites

You realize you're not posting an error, right?  You're posting code.

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.