The sessions on my server are being written but are not getting read
the following code used:
<?php
session_start();
if (isset($_POST['submit'])) {
if(!isset($_SESSION['cheese'])) {
$_SESSION['cheese'] = 1;
} else {
$_SESSION['cheese']++;
}
}
?>
session_start() creates new session on page reload meaning its not picking up the session. The above code displays no value.
php ini file looks like this for sessions:
cheese|i:1; <- this is whats stored in the session
EDIT*****************
Following on from the suggestion to check var_dump($_COOKIE, $_SESSION, $_REQUEST, FILE.LINE); the following is shown on each page
array(0) { } array(1) { ["test"]=> string(2) "hi" } array(0) { } string(36) "/data/vhosts/slacatalogue/sesh1.php5"
Array ( ) array(0) { } array(0) { } array(0) { } string(36) "/data/vhosts/slacatalogue/sesh2.php6"
writing it but not reading it