什么是session.bug_compat_42和session.bug_compat_warn?

什么是session.bug_compat_42和session.bug_compat_warn?

问题描述:

I know this topic is bit old, but i did surf the web and php.net site but didn't find the answer that I was looking for or i got bit confused!! :( . Below is my scenario.

I have installed the latest WAMP (fresh copy) (PHP 5.3.1 Apache 2.2.14 MySql 5.1.36)

I installed the joomla 1.5.20 and was getting error on 2nd step with error regarding cookie not being stored or error with session.save_path.

After looking into session.save_path everything was good and also the cookies were stored. So no issues were there.

After debugging more into joomla files and changing configuration of php.ini file I found that changing the parameters of session.bug_compat_42 and session.bug_compat_warn to off in php.ini file, the installation went good.

This might help some one. But my question is, how does this affect the installation of joomla and how exactly both the values makes difference to php!!??

Can some one please give me bit more information. Thanks, Tanmay

我知道这个主题有点旧,但我确实在网上和php.net网站上网但没找到 我正在寻找的答案,或者我有点困惑! :(。以下是我的方案。 p>

我安装了最新的WAMP(全新副本)(PHP 5.3.1 Apache 2.2.14 MySql 5.1.36) p> \ n

我安装了joomla 1.5.20并且第2步出错,错误表示没有存储cookie或者session.save_path错误。 p>

查看session.save_path之后所有内容 很好,也存储了cookie。所以没有问题。 p>

在调试更多joomla文件和更改php.ini文件的配置后,我发现更改了session.bug_compat_42的参数 和session.bug_compat_warn在php.ini文件中关闭,安装顺利。 p>

这可能对某人有所帮助。但我的问题是,这对joomla的安装有何影响以及如何 两个值都与php有所不同!! ?? p>

有人可以给我更多信息。 谢谢, Tanmay p> div>

it means your session defines a variable which also exists in global scope. and php thinks you wrote the code in a version < php4.2 and assumes you are actually trying to access an "unset" session variable from global scope.

something like

$_SESSION["foo"] = null;
$foo = "bar";

causes a warning which you can ignore by setting those php.ini parameters to "0"