Welcome Guest, Not a member yet? Register   Sign In
Multiple applications, one installation. APPPATH wrong?
#1

[eluser]harmstra[/eluser]
To achieve this, i have place the dirs like this

/home/user/CI/system

/home/user/domain.com/application

/home/user/domain/public_html/index.php


In the index.php i've put:

$system_folder = "/home/user/CI/system";
$application_folder ="/home/user/domain/application";


But now i get an error -> The configuration file config.php does not exist.

Now i've put a exit(APPPATH) in /system/codeignitor/Common.php in function get_config
It seems APPPATH is:


/home/user/CI/system//home/user/domain.com/application/

It looks like $system_folder and $application_folder concatenated.
If that is the case, this would mean that the application folder has to reside under the system folder.
#2

[eluser]harmstra[/eluser]
Ok, now I've got it working

$application_folder = "../../domain/application"

Is that really the way to solve this?
#3

[eluser]Pygon[/eluser]
http://ellislab.com/codeigniter/user-gui..._apps.html

Not sure if you've made changes elsewhere that break this functionality.
#4

[eluser]harmstra[/eluser]
This docs isn't about how to place the app folder outside of the system folder
#5

[eluser]Vince Stross[/eluser]
I'm doing some similar things, but I decided to use symlinks.

I.e.

In the '/home/user/domain/public_html/' folder for each application you create a symlink called 'ci_base' which points to '/home/user/CI/system' and then in your index.php file, your $system_folder would be:

$system_folder='ci_base'; (no forward slash!)

The application folder can work the same way.

create sym link called, 'ci_app' pointing to '/home/user/domain.com/application' then in the index.php file:

$application_folder='ci_app';

works like a charm!

In my server setup I have only one core CI installation and one application installation. It's for a CMS system that will control infinite domains on one server. So it makes sense for me to do it this way. For you it might make sense to keep the relative path declarations in there. One of the good things with sym links though is that you can keep javascripts, images, styles, etc in the /home/user/domain.com/application folder and include them in your views. For instance, if you had a javascript called whatever.js in /home/user/domain.com/application/js you could reference it in your view like this,

Code:
<scr#ipt language="javascript" src="/ci_app/js/whatever.js"></scr#ipt>

I use this for all kinds of things!

Hope this helps.
#6

[eluser]Avatar[/eluser]
Thanks for this
#7

[eluser]harmstra[/eluser]
beyondCiv, thanks.
That's a nice way to handle this 'problem'
I'll give it a try
#8

[eluser]Pygon[/eluser]
[quote author="harmstra" date="1204840396"]This docs isn't about how to place the app folder outside of the system folder[/quote]

Uh, yeah it is?

It is possible to move your application folder to a different location on your server than your system folder. To do so open your main index.php and set a full server path in the $application_folder variable.

Code:
$application_folder = "/Path/to/your/application";
#9

[eluser]Vince Stross[/eluser]
Pygon:

have you ever tried this? I have experienced mixed results. Check out the code in index.php. It does something different when there is a "/" in the variable string (can't look at it right now). I remember that the only way to make this work right in the long run was to use a symlink if you wanted the application folder to be outside the root of the current website.

I can't look at the file right now but there was a reason I swear! Wink
#10

[eluser]Noobigniter[/eluser]
@Vince Stross > thanks, i did not think to make symlink.




Theme © iAndrew 2016 - Forum software by © MyBB