Welcome Guest, Not a member yet? Register   Sign In
"config.php does not exist"
#1

[eluser]psylence[/eluser]
I have hit yet another road-block on my journey to get CodeIgniter to work properly...

And I have no real idea of why I'm getting the following error message...
Quote:The configuration file config.php does not exist.

I know for a fact that the "config.php" file does exist. I've double checked just to make sure, lol.

So, does anybody have any idea of why I'm getting this error?

Your help is very much appreciated Smile
#2

[eluser]coolfactor[/eluser]
Getting CodeIgniter to work properly is trivial. What is more important is knowing your specific setup. Can you describe your file structure? Where do you have your index.php in relation to the application folder, for example? An outline of this will help us help you. Please provide specifics about your setup.
#3

[eluser]psylence[/eluser]
okay...

My "index.php" is in the same folder as the "system" directory, the "license.txt", and the "user_guide" directory.

However, I followed the instructions in the 'installation' part of the 'user_guide', and changed the name of the 'system' directory to "core", if that helps at all.

I'll post what Im running on my server here in a minute.
#4

[eluser]psylence[/eluser]
Im running apache 2.2.4, and php 5.2.3 (parts of the linux version of XAMPP-server).

If theres anything else you need to know, just tell me.
#5

[eluser]coolfactor[/eluser]
Here is the function where the main config.php file is loaded (under CI 1.5.3):
Code:
/**
* Loads the main config.php file
*
* @access    private
* @return    array
*/
function &get;_config()
{
    static $main_conf;
        
    if ( ! isset($main_conf))
    {
        if ( ! file_exists(APPPATH.'config/config'.EXT))
        {
            exit('The configuration file config'.EXT.' does not exist.');
        }
        
        require(APPPATH.'config/config'.EXT);
        
        if ( ! isset($config) OR ! is_array($config))
        {
            exit('Your config file does not appear to be formatted correctly.');
        }

        $main_conf[0] =& $config;
    }
    return $main_conf[0];
}

Is it possible your APPPATH was not set correctly? What do you have it set to in index.php?
#6

[eluser]psylence[/eluser]
I haven't changed it...but here it is straight from my file:
Code:
define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION));
define('FCPATH', __FILE__);
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
define('BASEPATH', $system_folder.'/');

if (is_dir($application_folder))
{
    define('APPPATH', $application_folder.'/');
}
else
{
    if ($application_folder == '')
    {
        $application_folder = 'application';
    }

    define('APPPATH', BASEPATH.$application_folder.'/');
#7

[eluser]coolfactor[/eluser]
Try this after that code:

Code:
exit(APPPATH);

See what the value of APPPATH is actually being set to.
#8

[eluser]psylence[/eluser]
Im trying that code now.

But, Does This help? its from "/codeigniter/common.php"
Code:
function &get;_config()

{

    static $main_conf;

        

    if ( ! isset($main_conf))

    {

        if ( ! file_exists(APPPATH.'config/config'.EXT))

        {

            exit('The configuration file config'.EXT.' does not exist.');

        }

        

        require(APPPATH.'config/config'.EXT);

        

        if ( ! isset($config) OR ! is_array($config))

        {

            exit('Your config file does not appear to be formatted correctly.');

        }



        $main_conf[0] =& $config;

    }

    return $main_conf[0];

}
#9

[eluser]psylence[/eluser]
I tried that lil' code snippet, and when I went to my index page, There was one word on my screen: APPPATH.

EDIT:
oops, I put the code in the wrong spot the first time, the 2nd time it told me this:
Quote:/opt/lampp/htdocs/cms/_core_/application
#10

[eluser]coolfactor[/eluser]
Please share the exact code you used. Copy and paste.

It should be:
Code:
exit(APPPATH);

If that's what you had (without any quotes), and you still see APPPATH spit out to the browser, then it means that the APPPATH constant wasn't defined yet.

Please be very clear about what code you're using and where exactly you're putting it. This is just a debugging step in order to sort out your problem. Standard PHP tool.




Theme © iAndrew 2016 - Forum software by © MyBB