Hello all,
I changed configuration php.in with
session.cache_expire = 2
(for 2 minutes)
then create
session_start() ;
$_SESSION['gone'] = "OK-OK-OK" ;
After about 10 minutes, I reactive the page , it does not expired and still have
$_SESSION['gone'] = "OK-OK-OK" ;
Why ??? Please helps
Many thanks
Philo
SESSION EXPIRE, please help
Moderator: General Moderators
Pimptastic | Please use
ex2.php
Pimptastic | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Many thanks Feyd,
I use PHP5 with configure :
session.auto_start = 1
register_globals = On
session.gc_maxlifetime = 120
session.gc_probability = 100
session.gc_divisor = 100
session.cache_expire = 2 ( for 2 minutes)
I writed ex1.php and ex2.php ( see code below). After 10 minutes
ex2.php does not expire.
I refresh ex2.php then get the same values for
session_id and $_SESSION['gone'] = "OK-OK-OK"
Why ??? Helps please
Philo
===========xxxxxxxxxxxxxxxxx=================
ex1.phpCode: Select all
<?php
session_start() ;
$_SESSION['id'] = session_id() ;
$idval = $_SESSION['id'] ;
echo " session_id = $idval <br><br>" ;
$_SESSION['gone'] = "OK-OK-OK" ;
echo "<a href=\"ex2.php\">VERIFY</a>" ;
?>Code: Select all
<?php
session_start() ;
$iv = $_SESSION['id'] ;
$igo = $_SESSION['gone'] ;
echo "session_id = $iv <br><br>" ;
echo "session_gone = $igo" ;
?>Pimptastic | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]