From: akukin at ihug dot co dot nz Operating system: win2k & linux PHP version: 4.3.2 PHP Bug Type: Session related Bug description: session side-effect bug
Description: ------------ 1. After running the following source code I get: ================================================ 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 ================================================ I expect no such warning as I am not using any register_globals etc I am only using the suggested session handling API: session_start & $_SESSION array. 2. Also found: By changing the last 2 lines to: //$_SESSION["test"] = NULL; unset($_SESSION["test"]); warning disappears. By changing "$test = " to "$test2 = " warning disappears either. Shall it be the feature I would appreciate if you send me an explanation of this feature as it does not make any sense to me. Reproduce code: --------------- <? session_start(); $test = isset($_SESSION["test"]) ? $_SESSION["test"] : "test"; $_SESSION["test"] = NULL; //unset($_SESSION["test"]); ?> Expected result: ---------------- I expect not to have this warning as I am not using any register_globals etc I am only using the suggested session handling API: session_start & $_SESSION array. Actual result: -------------- 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 -- Edit bug report at http://bugs.php.net/?id=24380&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24380&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24380&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24380&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24380&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24380&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24380&r=support Expected behavior: http://bugs.php.net/fix.php?id=24380&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24380&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24380&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24380&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24380&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24380&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24380&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24380&r=gnused
