Welcome Guest, Not a member yet? Register   Sign In
change config items
#1

[eluser]works4u[/eluser]
I need to change config items either on the config.php page or within the controller itself.

I have tried to get sees_expiration on a controller and changed from the config file from a db table called settings.
#2

[eluser]Aken[/eluser]
Soooo what are you asking exactly?

Code:
$this->config->set_item('item_name', 'item_value');
#3

[eluser]works4u[/eluser]
$this->config->set_item('sess_expiration', '60');

Does not work for me if loaded into a controller. Any idea's?
#4

[eluser]CroNiX[/eluser]
You can't change the session config that way. It doesn't store it permanently in the config file. The very next request to the server will read the config file and set it back.
#5

[eluser]works4u[/eluser]
I want a way to do it site wide but store config settings in a db?
#6

[eluser]CroNiX[/eluser]
You'd have to create that functionality.
#7

[eluser]works4u[/eluser]
So I have session expiration in a db and want the user of a cms to control this. How would you go about this?
#8

[eluser]CroNiX[/eluser]
Not positive off the top of my head. But you probably shouldn't have session in autoload. You'd have to create a library, which would be autoloaded, that will read/write config data to the database. Then, in the construct of this library, have it read the config values from the database for the session and then initialize the session library. You might possibly have to extend the session library as well. Not sure. Never tried this. Why do you need to dynamically change the session time? Seems that should be constant.
#9

[eluser]works4u[/eluser]
Client wants to be able to change this.

Will post what I did.

Thank you




Theme © iAndrew 2016 - Forum software by © MyBB