|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-03-18 11:17 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Feb 20 19:00:01 2026 UTC |
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?