Welcome Guest, Not a member yet? Register   Sign In
Config files loaded twice, also How to separate Applications but share things

(This post was last modified: 04-09-2017, 10:28 AM by noobie.)

I'm using "Ion Auth".

I want to have a different Application for Administration and another for Users

index.php (system and application folders)
administration.php (system and admin folders)

But I want to still use the same libraries and stuff in application folder (so when I update them, the administration area libraries/configs are also updated)

For example for configs.php in admin app I did this:

PHP Code:


// Stuff that need new value
$config['base_url']            = $config['base_url'] .  'admin/';
$config['cookie_path']      = '/admin';
$config['cookie_prefix']    = 'admin'

I'm going to do the same for everything shared between them.

I have two questions:
1. Is this the standard way of doing this (separating apps while sharing some files with require_once)?
2. require_once doesn't work! it seems config files (any new config file added to CI) are being loaded twice! and Ion Auth community thinks it's a CI issue (shouldn't CI avoid loading stuff if they are already loaded?)

Issue on Github (Related to my #2 Question):

P.S. If you're wondering why I'm separating them, because those are 2 separate areas, I don't want any update to admin area cause unwanted issues for users or the other way around, also I can protect the administration.php file much better when it's separated, never to worry about Brute Force or anything like that.

Messages In This Thread
Config files loaded twice, also How to separate Applications but share things - by noobie - 04-09-2017, 10:21 AM

Theme © iAndrew 2016 - Forum software by © MyBB