I don’t know where something is wrong, the ZIP file was just been given to me, and a set of programmer ‘did’ the ‘half’ of the work, and now I should do it, the problem is, I don’t know where the error is, nothing shows when I go to localhost/wookay/
Here’s the code:
<?php
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
if (!defined('ROOT')) {
define('ROOT', dirname(dirname(dirname(__FILE__))));
}
if (!defined('APP_DIR')) {
define('APP_DIR', basename(dirname(dirname(__FILE__))));
}
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', ROOT);
}
if (!defined('WEBROOT_DIR')) {
define('WEBROOT_DIR', basename(dirname(__FILE__)));
}
if (!defined('WWW_ROOT')) {
define('WWW_ROOT', dirname(__FILE__) . DS);
}
if (!defined('CORE_PATH')) {
if (function_exists('ini_set') && ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'))) {
define('APP_PATH', null);
define('CORE_PATH', null);
} else {
define('APP_PATH', ROOT . DS . APP_DIR . DS);
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
}
}
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 -->";
}
?>
I forgot to tell you, I’m a bit noob on CakePHP, I usually use smarty template and create my own framework in the process, and I’m sure that the problem lies somewhere within the $Dispatcher = new Dispatcher(); I echoed before and after, it didn’t show whats after…
I Changed the config/core.php Configure::(‘debug’,0); to Cinfigure::(‘debug’,1);
When it was “0” nothing was showing, now, when I changed it to “1” everything is showing, but should 0 be production mode?
Turn on error reporting, add this line after the opening
<?phpor enable CakePHP’s debug setting by setting its value to
2you’ll do this inthen change this line to