As a newcomer to PHP, I need to get $_SESSION variables working as part of a larger project. I am finding that the I cannot transfer data between .php files using $_SESSION variables. I Googled for similar problems and found this solved problem.Same problem
I reduced my code to the exact same as the solution to the problem, but it still exists. I have
sesstest.php
<?php
session_start();
$_SESSION['test']="TEST SESSION TEXT";
header('location:sessreceive.php');
?>
sessreceive.php
<?php session_start();
echo $_SESSION['test'];
?>
I have cookies enabled and it is the same in Firefox and IE. The site I’m accessing is a Raspberry Pi on my home network. It is running Apache2 under a Linux version. The session part of my php.ini is

Could anyone please suggest what might be wrong, as I get no output in sessreceive.php?
Make sure that the
session.save_pathexists. Sometimes that is the problem.