R
Rouanou
Guest
Hi,
I've a problem with the php sessions.
It doesn't work.
My php.ini is correct :
...
session.auto_start On On
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 1000 1000
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /var/lib/php/session /var/lib/php/session
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid Off Off
...
With a test page like that :
...
The result is : "123" (OK)
But in the second page :
The result is : "The value is : "
Is there anyone to help me ??
I've a problem with the php sessions.
It doesn't work.
My php.ini is correct :
...
session.auto_start On On
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 1000 1000
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /var/lib/php/session /var/lib/php/session
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid Off Off
...
With a test page like that :
PHP:
<?
session_start();
$_SESSION['test']=123;
echo("Session test : ".$_SESSION['test']);
?>
<a href="test2.php">page 2</a>
...
The result is : "123" (OK)
But in the second page :
PHP:
<?
session_start();
if ( isset( $_SESSION['test'] ) ) {
echo("The value is : ". $_SESSION['test']);
} else {
echo("Error");
}
?>
The result is : "The value is : "
Is there anyone to help me ??