Skip to content
Advertisement

Your application folder path does not appear to be set correctly error in codeigniter

I get a error called “Your application folder path does not appear to be set correctly. Please open the following file and correct this: index.php”. I use the site within a folder in main domain. My .htaccess file is as follows, if required.

<IfModule mod_rewrite.c>

############################################
## enable rewrites

# For security reasons, Option followsymlinks cannot be overridden.
#    Options +FollowSymLinks
    Options +SymLinksIfOwnerMatch
    RewriteEngine on

############################################
## you can put here your magento root folder
## path relative to web root


############################################
## workaround for HTTP authorization
## in CGI environment

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

############################################
## always send 404 on missing files in these folders

    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/

############################################
## never rewrite for existing files, directories and links

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

############################################
## rewrite everything else to index.php

    RewriteRule .* index.php [L]

</IfModule>

<IfModule mod_security.c>
    # Turn off mod_security filtering.  SMF is a big boy, it does not need its hands held.
    SecFilterEngine Off

    # The below probably isn't needed, but better safe than sorry.
    SecFilterScanPOST Off
</IfModule>

Advertisement

Answer

You should post also your ‘config’ file, usually this come from a base_url or something messing up. My working site with CI uses:

$config['base_url']         = 'http://yourUrl.com/';
$config['index_page']           = '';
$config['uri_protocol']     = 'REQUEST_URI';
$config['url_suffix']           = '';

The .htaccess:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    #Add www.
    RewriteCond %{HTTP_HOST} ^www.yourUrl.com [NC]
    RewriteRule ^(.*)$ http://.yourUrl.com/$1 [L,R=301]

    RewriteCond %{REQUEST_URI} ^core.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

And all works fine. You could check with your own config/htaccess file.

From here: Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php and CodeIgniter CLI giving system_path error “path does not appear to be set correctly.”

The solution was to leave the $system_path blank…

$system_path = ”;

you can try this instead:

$system_path = ‘./system’;

Some people also solved this with setting permissions to CI folder:

  1. set the project folder permission to 755. Eg. sudo chmod 755 /var/www/myCIproject/

And last, for shared servers/folders:

https://serverfault.com/questions/371739/putting-folders-above-public-html-in-a-shared-hosting-environment

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement