0
votes

I am a total dummy to programming so pls understand if my question might sound dumb.

I successfully baked a cakephp website using "cake bake" command. I baked it in my webroot (C:\wamp\www) along with my core CakePHP. Then I decided to transfer my core CakePHP to another location so to prevent from making any accidental changes. When I tried to run the website after the core cakePHP was transfered I got 3 errors:

  • Warning: include(cake\bootstrap.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\cakeauth\webroot\index.php on line 76

  • Warning: include() [function.include]: Failed opening 'cake\bootstrap.php' for inclusion (include_path='C:\wamp\www\cakephp\cakephp_1.3.8;C:\wamp\www\cakeauth\;.;C:\php\pear') in C:\wamp\www\cakeauth\webroot\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:\wamp\www\cakeauth\webroot\index.php on line 77

  • My question is, how come the "baked php site" still need the core CakePHP? I think it should be stand alone. What if I am gonna transfer the site to another server / computer, do I have to transfer the core CakePHP along with it? I wanna if there's any work around for this. Pls help...

    2

    2 Answers

    3
    votes

    The bake console command only generates the stub classes for your MVC structure. It still depends on the cake folder for the library support.

    You can still move your cake folder around, but you need to specify the new location when you do move it.

    You can also run multiple cake applications that depend on the same library.

    Have a look at the advanced installation options in the bakery : http://book.cakephp.org/view/915/Advanced-Installation

    3
    votes

    The Cake Bake command only creates the default models, controllers and views based on your database structure, it does not build an out-of-the-box application, like a compiler.

    Your app still requires the CakePHP core files to be available to work, this is true with all frameworks, you cane however run multiple apps with their own app folder off one cake folder. You just need to update all the include paths in index.php to get yourself started.