Welcome Guest, Not a member yet? Register   Sign In
Separating Config Directory from Application?
#11

[eluser]JasonS[/eluser]
Hi Bas, that sounds like exactly what I am after. Thanks a lot. I will give it a go when I finally complete my app.
#12

[eluser]Bas Vermeulen[/eluser]
You're welcome, glad I could help out Smile
#13

[eluser]old_guy[/eluser]
I have a similar need and I'm curious as to how you set up the user log-in to the individual sites?
#14

[eluser]Bas Vermeulen[/eluser]
If you use this setup to deploy two different sites, with different databases you should be able to use w/e kind of login/auth system you want to, it really doesn't matter.

With my setup I made it possible to deploy a front-end (FE) and a back-end (BE) from the same application, using the same database with different database users (the back-end user has some more permissions). Instead of defining DB_GROUP I define DEPLOYMENT_TYPE in my index files. Then, I have two session tables (cms_sessions_FE & cms_sessions_BE) and two login tables (cms_logins_FE & cms_logins_BE) in my database. In my config.php I set which session table should be used:

Code:
$config['sess_cookie_name']        = 'ci_session_'.DEPLOYMENT_TYPE;
$config['sess_expiration']        = 7200;
$config['sess_encrypt_cookie']    = FALSE;
$config['sess_use_database']    = TRUE;
$config['sess_table_name']        = 'cms_sessions_'.DEPLOYMENT_TYPE;
$config['sess_match_ip']        = TRUE;
$config['sess_match_useragent']    = TRUE;
$config['sess_time_to_update']     = 300;

My logins are set in the table 'cms_logins_'.DEPLOYMENT_TYPE

With this setup I can run both deployments, from one database with separated logins using the same users table. The BE deployment ofc got some extra checks to let only admin users login.




Theme © iAndrew 2016 - Forum software by © MyBB