duangenshi9836 2010-08-26 12:51
浏览 69
已采纳

什么是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 2010-08-26 13:28
    关注

    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"

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 luckysheet
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型
  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误