Welcome Guest, Not a member yet? Register   Sign In
Install C.I. above root directory
#1

[eluser]emily87[/eluser]
Hi, real newbie question...

I've looked through the user guide (which is great) but couldn't find anything to say you could install it above the root directory.

I've always stored anything not required to be viewed by users: configuration files, database access details etc. above the root directory.

Is it possible to do this with CI? If not, how safe is it if folders containing framework code are within the root directory?
#2

[eluser]xwero[/eluser]
that is not a problem just point the $system_folder and $application_folder to the directory above the root and off you go.
#3

[eluser]emily87[/eluser]
Thanks for such a fast response!

That's great news, thank you.
#4

[eluser]xwero[/eluser]
You can find those variables in the index.php file. forgot to mention it in the previous response Smile
#5

[eluser]Eric Cope[/eluser]
Someone should mention it is a good idea to place the CI system folder above the web root directory (public_html apache).
#6

[eluser]edhrx[/eluser]
@xwero

The index.php you refer to is in the root of the web site ?

Ed.
#7

[eluser]xwero[/eluser]
[quote author="edhrx" date="1207834344"]@xwero

The index.php you refer to is in the root of the web site ?

Ed.[/quote]
yes
#8

[eluser]betelgeuse[/eluser]
[quote author="xwero" date="1207768876"]that is not a problem just point the $system_folder and $application_folder to the directory above the root and off you go.[/quote]

Just wondering what a sample would look like. I've tried to point CI above the root directory a couple different ways and neither works...

Code:
Changing
$system_folder = "system";
$application_folder = "application";
to
$system_folder = "../system";
$application_folder = "../application";

and trying the full system location /var/www/codeigniter/system.

I'm not quite sure where to change it within.
#9

[eluser]xwero[/eluser]
You need a full path if you put the directories above the root.
#10

[eluser]betelgeuse[/eluser]
Awesome, yeah I had to edit the vars to this for anyone's future reference

Code:
$system_folder = "/var/www/codeigniter/system";
$application_folder = "/var/www/codeigniter/system/application";

I forgot the application folder is within the system folder and if you change it from the norm you have to give it the full path for each.




Theme © iAndrew 2016 - Forum software by © MyBB