I've just upgraded from php4.1.1 to php 4.3.3.
Now that I tried to login to the site, it gives me a warning:
"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 "
What can I do besides the above recommended? Please advice. Thanks in advance!
Here's the code:
<?php
// include function files for this application
require_once("all_functions.php");
session_start();
$username = $HTTP_POST_VARS["username"];
$password = $HTTP_POST_VARS["password"];
if ($username && $password)
// they have just tried logging in
{
if(login($username, $password))
{
// if they are in the database register the username
$valid_user = $username;
session_register("valid_user");
}
else
{
// unsuccessful login
do_html_header("Problem:");
echo "You could not be logged in. <br>
You must be logged in to view this page. <br>
Please go back and try again.<p>";
do_html_url("home.php","Login");
do_html_footer();
exit;
}
}
do_html_header("Members - Home");
//check_valid_user
if (session_is_registered("valid_user"))
{
display_publisher_menu();
echo "Logged in as $valid_user.";
echo "<br>";
}
else
{
// they are not logged in
do_html_heading("Problem:");
echo "You are not logged in.<br>";
do_html_url("home.php", "Login");
do_html_footer();
exit;
}
do_html_footer();
?>