Link to home
Create AccountLog in
Avatar of AlexAmbler
AlexAmbler

asked on

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 dat

Hi,

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

Above is the warning I receive on some on my pages, a common topic on ee, is this regarding the code below? If not how do I find the line it refers to as the warning states line ‘0’

<?php
session_start();

if (!$_SESSION["valid_user"])
{
// User not logged in, redirect to login page
Header("Location: login.php");
}

Open in new window

Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

It's a configuration variable.  Assume you are at PHP 5+, right?  Ask your hosting company to turn this old thing off.
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of AlexAmbler
AlexAmbler

ASKER

thank you.