Thursday, May 24, 2012

Very newbie question. Trying to define cake core include path

I just donwloaded cakephp 2, just starting to learn it.

So here's what it says in the cook book.

The CakePHP core libraries will be placed in /usr/lib/cake.

if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', DS . 'usr' . DS . 'lib');
}

So I only need to define up till /lib ? without the /cake? Does that
mean my cake source will always be in a directory called cake?

In my case, my cake source is here
/var/www/lib/cake
And I copied webroot over to here
/var/www/html/caketest

So my index.php should have these?

if (!defined('ROOT')) {
define('ROOT', DS . 'var' . DS . 'www' . DS . 'html');
}

if (!defined('APP_DIR')) {
define('APP_DIR', 'caketest');
}

if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', DS . 'var' . DS . 'www' . 'lib');
}

So far I'm only getting blank pages. The index.php seems to stops
right at
App::uses('Dispatcher', 'Routing');

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: