Jump to content

Cakephp Error


alvin567

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?

Link to comment
https://forums.phpfreaks.com/topic/262904-cakephp-error/
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?

Link to comment
https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350071
Share on other sites

  Quote

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.

Link to comment
https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350325
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?

Link to comment
https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350482
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.

Link to comment
https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350483
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');

Link to comment
https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350488
Share on other sites

  Quote

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

 

  Quote

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

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

 

Do you see what I see?

Link to comment
https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350497
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);

}

Link to comment
https://forums.phpfreaks.com/topic/262904-cakephp-error/#findComment-1350736
Share on other sites

Archived

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

×
×
  • 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.