Session Error
Posted: Tue Apr 27, 2010 7:55 am
This warning message only appear for the first time the code run.
I also have another code for login system but never received this error message before.
What could possibly wrong?
[text]
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
[/text]
Thanks.
I also have another code for login system but never received this error message before.
What could possibly wrong?
[text]
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
[/text]
Code: Select all
<?
session_start();
$a = "this is a";
$b = "this is b";
session_register("a");
session_register("b");
echo $_SESSION['a']."<br>".$_SESSION['b'];
echo "<br>";
echo "<a href=\"2.php\">Next</a>";
?>