Hi for averybody!
I'm using Apache 2.0.46 & PHP 4.3.0 on Win32 (XP) and there is one problem with sessions:
I've some code
page1:
<?
session_start();
echo 'session_id -> '.session_id();
$SESSON['str'] = 'Hello world';
echo $SESSON['str'];
?>
<a href="page2.phtml">link</a>
and page2:
<?
session_start();
echo 'session_id -> '.session_id();
echo 'str -> '.$_SESSON['str'];
?>
when I set
session.use_cookies=0
session.use_only_cookies=0
session.use_trans_sid=1
in php.ini it works fine, I see session id in URL and creates same file in c:\temp.
But when I want to use cookies, I set
session.use_cookies=1
session.use_only_cookies=0 (and I'm try 1 too)
session.use_trans_sid=0 (1 I'm try out too)
It creates in c:\temp one file like session_id on page1and I see str with Hello ..., and another empty file like session_id on page2.
So question is:
why the same code works fine in first case and can't in second?
why in second case page2 can't see session_id from page1?
Thanks!