MHaris
08-16-2007, 11:37 PM
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
This only happens when I register the sessions for the first time, if I try to re-login with the sessions already registered, the error doesn't comes up.
index.php
<?php
// Last Modified 16th August
ob_start();
include('templates/header.php'); // Header template
include('../config/config.php'); // Includes configuration files
include('../lib/functions.php'); // Load all functions from Library
include('templates/login.php'); // Login form
$submit = $_POST['log_in'];
$posted_username = sql_safe($_POST['username']);
$posted_password = sql_safe($_POST['password']);
if(isset($submit)){
if($posted_username == $username && $posted_password == $password){
echo "Logged in";
session_register("username");
session_register("password");
}
else {
echo "Wrong username or password";
}
}
?>
Any idea what might be the problem since I'm not using any global variables?
This only happens when I register the sessions for the first time, if I try to re-login with the sessions already registered, the error doesn't comes up.
index.php
<?php
// Last Modified 16th August
ob_start();
include('templates/header.php'); // Header template
include('../config/config.php'); // Includes configuration files
include('../lib/functions.php'); // Load all functions from Library
include('templates/login.php'); // Login form
$submit = $_POST['log_in'];
$posted_username = sql_safe($_POST['username']);
$posted_password = sql_safe($_POST['password']);
if(isset($submit)){
if($posted_username == $username && $posted_password == $password){
echo "Logged in";
session_register("username");
session_register("password");
}
else {
echo "Wrong username or password";
}
}
?>
Any idea what might be the problem since I'm not using any global variables?