Welcome Guest, Not a member yet? Register   Sign In
Config File is Double Loading
#1

[eluser]fjamal[/eluser]
Suddenly, for some reason, my application/config/config.php started loading twice.

I have the following code at the top of config file, starts from line 5 to line 12:
Code:
function __autoload ($class) {
    $file = APPPATH . 'libraries/' . $class . EXT;
    if (strpos($class, 'CI_') !== 0) {
        if (file_exists($file) && is_file($file)) {
            @include_once (APPPATH . 'libraries/' . $class . EXT);
        }
    }
}

When i test a page, i get this error:

Code:
Fatal error: Cannot redeclare __autoload() (previously declared in C:\xampp\htdocs\ci_centric\application\config\config.php:5) in C:\xampp\htdocs\ci_centric\application\config\config.php on line 12


If i wrap the autoload with
Code:
if(!function_exists('__autoload')) { ... }
, i get the following output:
Code:
Notice: Constant FRONTEND_PATH already defined in C:\xampp\htdocs\ci_centric\application\config\config.php on line 390

    Notice: Constant FRONTEND_WEBPARTS_PATH already defined in C:\xampp\htdocs\ci_centric\application\config\config.php on line 391

    Notice: Constant FRONTEND_MAINPAGES_PATH already defined in C:\xampp\htdocs\ci_centric\application\config\config.php on line 392

    Notice: Constant BACKEND_PATH already defined in C:\xampp\htdocs\ci_centric\application\config\config.php on line 393

    Notice: Constant BACKEND_WEBPARTS_PATH already defined in C:\xampp\htdocs\ci_centric\application\config\config.php on line 394

    Notice: Constant BACKEND_MAINPAGES_PATH already defined in C:\xampp\htdocs\ci_centric\application\config\config.php on line 395

   Notice: Constant BACKEND_MAINPAGES_PATH already defined in C:\xampp\htdocs\ci_centric\application\config\config.php on line 396
    .
    .
    .

Everything used to work fine for days; i just got the config double loading problem today.

Any help will be appreciated...


Messages In This Thread
Config File is Double Loading - by El Forum - 07-10-2012, 12:05 AM
Config File is Double Loading - by El Forum - 07-10-2012, 12:38 AM
Config File is Double Loading - by El Forum - 07-10-2012, 03:52 AM
Config File is Double Loading - by El Forum - 08-01-2012, 03:50 PM
Config File is Double Loading - by El Forum - 08-01-2012, 04:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB