0
votes

I am getting an error while hosting a cakephp app:

Fatal error: Can't find application core file. Please create /home/home/a1808794/a1808794/home/a1808794/app/Config/core.php, and make sure it is readable by PHP. in /home/a1808794/lib/Cake/Core/Configure.php on line 78

Failed opening '/home/home/a1808794/a1808794/home/a1808794/app/Config/core.php' for inclusion (include_path='/home/a1808794/lib.:/usr/lib/php:/usr/local/lib/php') in /home/a1808794/lib/Cake/Core/Configure.php on line 77

The index.php

if (!defined('ROOT')) {
    //define('ROOT', dirname(dirname(dirname(__FILE__))));
    define('ROOT', dirname(dirname(dirname(__FILE__))).DS.'home'.DS.'a1808794');
}

/**
 * The actual directory name for the "app".
 *
 */
if (!defined('APP_DIR')) {
    define('APP_DIR', basename(dirname(dirname(__FILE__))).DS.'home'.DS.'a1808794'. DS .'app');
}
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
    if (function_exists('ini_set')) {
    /*ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR .    ini_get('include_path'));*/
    ini_set('include_path','home'. DS . 'a1808794'. DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));

}
1
Is your core.php missing or permissions need to be set for it? - cartina

1 Answers

1
votes

I'm not sure why you think it was necessary to modify the index.php file and replce this:

define('ROOT', dirname(dirname(dirname(__FILE__))));

With this:

define('ROOT', dirname(dirname(dirname(__FILE__))).DS.'home'.DS.'a1808794');

And replace this:

ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR .    ini_get('include_path'));

With this:

ini_set('include_path','home'. DS . 'a1808794'. DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));

And set the app dir to:

define('APP_DIR', basename(dirname(dirname(__FILE__))).DS.'home'.DS.'a1808794'. DS .'app');

Because that is breaking the includes. Your app is now trying to include /home/home/a1808794/a1808794/home/a1808794/app/Config/core.php which is obvisouly not a valid path. Restoring the original index.php should work just fine. If it doesn't, please state what the actual problem was that made you modify the index.php in the first place. The index.php should work out of the box and I have not had to modify it ever.