PDA

Click to See Complete Forum and Search --> : Php session expire


Pino
Feb 12th, 2005, 04:45 AM
Ok i've just set up a control pannel for a client of mine so they can edit add delete news posts and events,

Now the sesions all work fine but they time out after a few minutes, is there any way i can increase the time out of the sessions? I've been looking at the manual

http://us4.php.net/manual/en/ref.session.php

session.cache_expire "180" PHP_INI_ALL

And i think thats the setting i need o chnage but i have no idea how to do it? Could anyone assist me on this?

Thanks

john tindell
Feb 12th, 2005, 05:30 AM
Use ini_set() http://us4.php.net/manual/en/function.ini-set.php

ini_set("session.cache_expire",180);

That should work as far as i know but i haven't tried it yet.

[EDIT]

you can also use ini_get to check what values have been set if you don't have access to the php.ini files

http://us4.php.net/manual/en/function.ini-get.php

visualAd
Feb 13th, 2005, 03:52 AM
All the PHP modules which have ini dierectves associated with them will be displayed inthe following way in the PHP documentation, which will give you information on when and where they can be set. Some directives can be set only in the php.ini file, PHP_INI_SYSTEM and some can be set anywhere, PHP_INI_ALL.

directive.name "default" PHP_INI_*

For settings which are PHP_INI_ALL or PHP_INI_USER, you can use the ini_set() (http://www.php.net/ini_set) function, tochnage the values of in your script. These changes are however volatile and the settings will go back to their original as per defualt or php.ini file the next time the script is called.