I have a PHP authentication system on my website using the $_SESSION variable.
A form submits a username and password to the file \"login.php\". It is handled like t
WAMP server 2 - settings are not set by default for $_SESSION
var.
PHP.ini requires the following settings
C:\wamp\bin\apache\apache2.4.2\bin\php.ini
session.cookie_domain =
session.use_cookies = 1
session.save_path = "c:\wamp\tmp" ;ensure the \ is used not /
Session testing -
load.php -- load $_SESSION
var.
<?PHP
session_start();
$_SESSION['SESS_MEMBER_ID'] = 'stored variable';
session_write_close();
header("location:print.php");
?>
print.php -- print $_SESSION var.
<?PHP
session_start();
var_dump($_SESSION);
?>
run the script in your browser var_dump()
should produce results
go to c:\wamp\tmp
Files containing the session data will appear here.