Welcome Guest, Not a member yet? Register   Sign In
Separating Config Directory from Application?
#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.


Messages In This Thread
Separating Config Directory from Application? - by El Forum - 09-13-2010, 07:06 AM
Separating Config Directory from Application? - by El Forum - 09-13-2010, 07:15 AM
Separating Config Directory from Application? - by El Forum - 09-13-2010, 08:29 AM
Separating Config Directory from Application? - by El Forum - 09-13-2010, 08:53 AM
Separating Config Directory from Application? - by El Forum - 09-13-2010, 09:00 AM
Separating Config Directory from Application? - by El Forum - 09-13-2010, 10:59 AM
Separating Config Directory from Application? - by El Forum - 09-14-2010, 08:09 AM
Separating Config Directory from Application? - by El Forum - 09-14-2010, 08:13 AM
Separating Config Directory from Application? - by El Forum - 09-14-2010, 10:56 AM
Separating Config Directory from Application? - by El Forum - 09-14-2010, 12:33 PM
Separating Config Directory from Application? - by El Forum - 09-16-2010, 08:35 AM
Separating Config Directory from Application? - by El Forum - 09-16-2010, 01:55 PM
Separating Config Directory from Application? - by El Forum - 10-13-2010, 01:57 PM
Separating Config Directory from Application? - by El Forum - 10-13-2010, 02:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB