Welcome Guest, Not a member yet? Register   Sign In
path error in exception.php
#6

[eluser]Unknown[/eluser]
I am having the same issue. The reason most people are not seeing this error is because they are running CI at the root level of their web server. In my case, it's in a directory under the root.

The problem seems to be that index.php defines the constant APPPATH to:

// The path to the "application" folder
if (is_dir($application_folder))
{
define('APPPATH', $application_folder.'/');
}

In my case, this sets APPPATH to "application/". (note how that's not a fully-qualified path), and that would not naturally be in the include_path, since "application" is in a folder underneath the web root.

So, when Exception.php tries to load the file,
include(APPPATH.'errors/error_php'.EXT);

...that path does not exist, so it throws an error:

[04-Jun-2011 05:26:24] PHP Warning: include() [<a href='function.include'>function.include</a>]: Failed opening 'application/errors/error_php.php' for inclusion (include_path='') in ...[snip].../ci/system/core/Exceptions.php on line 167

Seems like an easier solution to the class override you suggest above would just be to put the actual CI directory in the include_path in php.ini.

Nevertheless, the coding in index.php is clearly a bug. Can someone file it and hopefully fix it in the future?


Messages In This Thread
path error in exception.php - by El Forum - 03-22-2011, 11:07 AM
path error in exception.php - by El Forum - 04-07-2011, 09:26 AM
path error in exception.php - by El Forum - 04-07-2011, 10:56 AM
path error in exception.php - by El Forum - 04-07-2011, 01:21 PM
path error in exception.php - by El Forum - 04-07-2011, 01:56 PM
path error in exception.php - by El Forum - 06-03-2011, 11:44 PM
path error in exception.php - by El Forum - 06-06-2011, 01:16 PM
path error in exception.php - by El Forum - 06-26-2012, 12:24 PM
path error in exception.php - by El Forum - 06-26-2012, 12:59 PM
path error in exception.php - by El Forum - 06-26-2012, 01:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB