php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22769 side effect in 4.2.3
Submitted: 2003-03-18 10:57 UTC Modified: 2003-03-18 11:17 UTC
From: jcobb at reports dot net Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.1 OS: win 2k
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jcobb at reports dot net
New email:
PHP Version: OS:

 

 [2003-03-18 10:57 UTC] jcobb at reports dot net
tracking down the problem with the warning message:

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, 

i've found another strange observation: people are reporting problems with their settings in php.ini, e.g. setting bug_compat_warn=off will not make the message go away. 

the message WILL indeed disappear, but only if the server is freshly restarted and no session file is present. given example:

php.ini: 
session.bug_compat_42 = 1
session.bug_compat_warn = Off

code used:
session_start();
if (! session_is_registered("foobar")) { print "registering"; session_register("foobar"); $foobar=1; }

clear all session files; restart server; reload > no warning.
then: remove the session file that was just created;
reload > warning reappears and will remain no matter 
what you do. 

how does this make sense? there should be no difference between the first call and the second. if the session file is missing, it's missing and a new one should be generated. 

i've reproduced this on 3 different systems and could not believe it. can you check if there is a flag that messes things up after displaying the message for the first time? 





Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-18 11:17 UTC] sniper@php.net
Yes, just don't do that.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 18 14:00:02 2025 UTC