Ok - first I've confirmed sessions working with this test script:
However when I'm using my code it doesn't work in Chrome or Safari but does work in FireFox, IE8, and Opera.
At the end of my code I put:
I am seeing the session data in the browser. At this point I go to the server and I can find the session file - but it is empty (though only when I'm using Safari or Chrome). Any ideas as to what might be causing it to not save the session data?
Thanks.
Code:
<?php
session_start();
if (!isset($_SESSION['counter'])) $_SESSION['counter']=0;
echo "Counter ".$_SESSION['counter']++." ???.<br><a href=".$_SERVER['PHP_SELF'].">reload</a>";
?>
At the end of my code I put:
Code:
echo session_id(); echo '<pre>'; var_dump($_SESSION); echo '</pre>';
session_write_close(); exit();
Thanks.