Take a look at the following 2 pieces of code:
test.php:
<?
session_start();
$_SESSION['test'] = 'TEST SESSION';
header('location:receive.php');
?>
receive.php
<?
session_start();
echo $_SESSION['test'];
?>
When I run in the browser test.php, it redirects me to receive.php, but the following warning is displayed:
Notice: Undefined index: test in /var/www/html/sessreceive.php on line 2
In other words, $_SESSION is not coming with 'test', as it should.
I've been trying whole day to find a solution to this, but no luck. I saw many issues related to 'session.save_path', but mine is set, folder writable and it seems to work - I can see session files being created under my specified tmp folder.
I am working on a VPS so I am able to check anything. But still facing the problem.
PS: This is a simple example - my real problem is with one Prestashop installation that is hanging in step 2 - and searching over the internet, that was the reason - sessions are not good.
Any help would be much appreciated.