Session expire time in phpCAS
Veli AKÇAKAYA
akcakaya at sabanciuniv.edu
Tue Sep 25 08:40:28 EDT 2007
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
> <akcakaya at sabanciuniv.edu> 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
> Mark.McLaren at bristol.ac.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tp.its.yale.edu/pipermail/cas/attachments/20070925/63d258a8/attachment.html
More information about the cas
mailing list