CodeIgniter Forums
Install C.I. above root directory - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Install C.I. above root directory (/showthread.php?tid=7442)

Pages: 1 2


Install C.I. above root directory - El Forum - 04-09-2008

[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?


Install C.I. above root directory - El Forum - 04-09-2008

[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.


Install C.I. above root directory - El Forum - 04-09-2008

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

That's great news, thank you.


Install C.I. above root directory - El Forum - 04-09-2008

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


Install C.I. above root directory - El Forum - 04-09-2008

[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).


Install C.I. above root directory - El Forum - 04-10-2008

[eluser]edhrx[/eluser]
@xwero

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

Ed.


Install C.I. above root directory - El Forum - 04-10-2008

[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


Install C.I. above root directory - El Forum - 04-10-2008

[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.


Install C.I. above root directory - El Forum - 04-10-2008

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


Install C.I. above root directory - El Forum - 04-10-2008

[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.