Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On my local environment, the following settings work in my index.php file:

$system_path = '../../ci/system/';
$application_folder = '../../ci/application';

My folder structure looks like this:

-ci
---system
---application

-public_html
---site
----index.php

This works on my local environment, but when I upload my files, I get an error message:

Your system folder path does not appear to be set correctly. 
Please open the following file and correct this: index.php

I tried the following:

$system_path = dirname(__FILE__).'../../ci/system/';
$application_folder = dirname(__FILE__).'../../ci/application';
share|improve this question
    
May I ask Why do you need such arrangement? –  Khaled Mar 21 '12 at 8:23
    
Not sure this can be done on shared hosting since public_html will be set by default for security. –  Errol Fitzgerald Mar 25 '12 at 10:45
    
@khaled it's the recommended setup for the framework I am using...so certain folders such as /system/ and /application/ are harder to access –  redconservatory Mar 26 '12 at 23:44
    
@Errol I seemed to be able to do this via symlinking in php so I guess that was the solution –  redconservatory Mar 26 '12 at 23:44
add comment

1 Answer

The site I am using is with hostgator and the following worked:

In http://www.yoursitename.com/link.php, put

<?php symlink('/home/username/ci/system', '/home/username/public_html/system'); ?>
<?php symlink('/home/username/ci/application', '/home/username/public_html/application'); ?>

Then visit http://www.yoursitename.com/link.php in your browser. If the screen is blank, it worked (the symlinks are created)

Then, in your configuration file (for me it's index.php), change the links as if they were in public_html:

$system_path = 'system';
$application_folder = 'application';
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.