duangenshi9836
duangenshi9836
2010-08-26 12:51

什么是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

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • duanjia2772 duanjia2772 11年前

    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"

    点赞 评论 复制链接分享