I'm using Apache-win-php4.1.3 and can't create session variables by
using session_start() and $_SESSION['.......']. I'm new to php, please
help.
Next week I tried php4.1.1 and all was working well. Now, I'm using
php4.1.2, as an Apache module and with
session.use_trans_sid=1,register_globals=off in php.ini, I can't
redirect a page to another and access the $_SESSION['variables'] defined
in the 1st document. All codes that were working correctly first now do
not.
es. pageone.php
<?php
session_start();
$_SESSION['var']="testsession";
header( "Location: anotherpage.php?".SID);
exit;
?>
-----
anotherpage.php
<?php
session_start();
print $_SESSION['var'];
..................
?>
N.B: I got a warning: undefined index : var; and make some controls I
noticed that $_SESSION['var'] is not set in the anotherpage.php. And in
pageone.php, $_SESSION['var'] is set as a normal variable but not a
session variable because all files (sess_21ae6dg34............) in the
temp directory are EMPTY.....EMPTY......
$_SESSION isset but $_SESSION['.......'] exits in a page as a normal
variable but not a session variable.
Please help me. Thank u.
John |