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. ....
當撰寫PHP程式碼,
設定Session
例如: $_SESSION['var1']=null;
發生下述警告訊息
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
解決方法一:
更新PHP到最新版本。
解決方法二:
在程式碼最上方加上下面兩行
ini_set('session.bug_compat_warn', 0);
session.bug_compat_warn = 0
參考或是複製語法時,別忘了留個言喔 ^ ^ ~