Welcome Guest, Not a member yet? Register   Sign In
Temporarily Disable "sess_use_database" for specific controller?

[eluser]Paul Wenzel[/eluser]
I am attempting to use the new Database Forge class to create a fancy install script like the one used in Wordpress. The install script (controller) is set up to create a "ci_sessions" table so that I may use database-driven sessions.

Unfortunately, the install script throws an "table does not exist" error because CodeIgniter is configured to use "ci_sessions" before it has been created! This is due to my auto-loading the session class in autoload.php.

To fix this, I attempted to disable the sess_use_database option in my install controller.

This does not seem to work:
$this->ci->config->set_item('sess_use_database', FALSE);

Can anyone provide a hint or workaround for my situation?


[eluser]Paul Wenzel[/eluser]
Well, nevermind that question. I decided to replace CI's database-driven sessions with the Native Session library. Using PHP sessions as an alternative, the problem is resolved and may work better for me in the long run.

Theme © iAndrew 2016 - Forum software by © MyBB