Hi,
I have a website which has an admin area 'protected' by a log in script and the checking of session variables. It has been working fine for months, I have not dabbled with this website for ages, so it's not a coding problem. I'm guessing something has changed at the hosting company that has rendered the way I use session cookies invalid -I don't know!
To test I set up two files
set_session_var.php
get_session_var.php
On the first page, the array is printed showing the session variable set. Second page "Array()" is returned showing no results!
I've searched the forum, and wasted many hours trying various proposed solutions with no joy. I've checked to make sure the directory is writeable - it is. And now I am stuck.
PHP 4.4.9 on Windows.
TIA
Caff
Results of PHPINFO
I have a website which has an admin area 'protected' by a log in script and the checking of session variables. It has been working fine for months, I have not dabbled with this website for ages, so it's not a coding problem. I'm guessing something has changed at the hosting company that has rendered the way I use session cookies invalid -I don't know!
To test I set up two files
set_session_var.php
Code:
<?php
session_start();
$_SESSION['loggedin']="Y";
session_write_close();
print_r($_SESSION);
?>
<a href="get_session_var.php">TEST</a>
get_session_var.php
Code:
<?php
session_start();
print_r($_SESSION);
?>
On the first page, the array is printed showing the session variable set. Second page "Array()" is returned showing no results!
I've searched the forum, and wasted many hours trying various proposed solutions with no joy. I've checked to make sure the directory is writeable - it is. And now I am stuck.
PHP 4.4.9 on Windows.
TIA
Caff
Results of PHPINFO
Code:
session
Session Support enabled
Registered save handlers files user
Directive Local Value Master Value
session.auto_start Off Off
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 100 100
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 c:\php\sessiondata c:\php\sessiondata
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid Off Off