I seem to be able to register data with no problems but when I try to retrieve data from sessions I run into problems. After I switched to PHP5 I have made no changes to the way I use sessions but reading sessions is hit and miss. They ran fine in PHP4.
I can register a variable fine like:
$_SESSION['logged'] = 1;
It is a struggle to get data. Sometimes it works and sometimes it doesn't.
$user_log = $_SESSION['logged'];
I don't know if something is wrong with my php.ini settings:
[Session]
session.save_handler = files
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 100
session.gc_maxlifetime = 1440
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 4
Any ideas?