Hello,

We've tried the code below to set PHP CAS's session timeout but it didn't work. Is there anything else we should do to increase session's timeout length?

Thanks again...

MJ McLaren, Information Systems and Computing wrote:
Hi Veli,

Your English is definitely better than my Turkish! I do not know very much about PHP by my guess is something like this might work:

include_once('CAS/CAS.php');
// 28800 seconds = 480 minutes = 8 hours
session_save_path('/somenewplace');
session_set_cookie_params(28800, "/");
ini_set( "session.gc_maxlifetime", "28800" );

phpCAS::client(CAS_VERSION_2_0,'login.sabanciuniv.edu',443,'cas');
phpCAS::forceAuthentication();
if (isset($_REQUEST['logout'])) {
        phpCAS::logout();
}

The phpCAS::client includes a call to "session_start();" so the session configuration code needs to happen before you call phpCAS:client.

See also:

<http://www.captain.at/howto-php-sessions.php>

I hope this helps,

Mark

--On 11 September 2007 09:50 +0300 Veli AKÇAKAYA <[EMAIL PROTECTED]> wrote:

Hi,
first of all thanks for your answer. Yes, we use PHP portlet in iframe.
Each PHP application includes phpCAS client. Altough session not expire
uPortal java portlet's, php portlet in Iframe's session is expire after 3
hours. We would to set session time 8 hours but any isn't change in
php.ini file. Actually we do not change the cas.php file, because various
PHP application use the the file. Is there any parameter about session
time in phpCAS client, if not;  how set the session time?
Frankly, my English isn't very well, sorry :(
Thanks again.

Example code:
include_once('CAS/CAS.php');
phpCAS::client(CAS_VERSION_2_0,'login.sabanciuniv.edu',443,'cas');
phpCAS::forceAuthentication();
if (isset($_REQUEST['logout'])) {
        phpCAS::logout();
}
----------------------
MJ McLaren, Information Systems and Computing
[EMAIL PROTECTED]
_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

Reply via email to