“register_globals off”和“会话副作用”和“会话副作用”。 [英] "register_globals off" and "session side-effect"

查看:89
本文介绍了“register_globals off”和“会话副作用”和“会话副作用”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我将register_globals设置为关闭并尝试让我的代码在

下运行新条件。我坚持以下问题:


警告:未知():您的脚本可能依赖于会话端 -

效果,直到PHP 4.2.3 。请注意,

会话扩展不会将全局变量视为

数据的来源,除非启用了register_globals。您可以通过将session.bug_compat_42或

session.bug_compat_warn分别设置为off来禁用此

功能和此警告。在第0行的Unknown中


我不知道他们在会话副作用下的理解是什么。 as

以及会话扩展以及这个扩展如何可以考虑

的东西。


我试图在新闻组中找到一些东西,我发现:
http://groups.google.com/group/comp....b0666dea7d75fd


但我不确定我是否正确理解建议的解决方案

的问题。我应该用正常变量替换我关心的所有全局变量

?即$ varname = global-array [$ varname]。

为什么我不能直接使用全局变量?

解决方案

varname = global-array


varname]。

为什么我不能直接使用全局变量?


Kurda Yon写道:





我将register_globals设置为关闭并尝试让我的代码在

新条件。我坚持以下问题:


警告:未知():您的脚本可能依赖于会话端 -

效果,直到PHP 4.2.3 。请注意,

会话扩展不会将全局变量视为

数据的来源,除非启用了register_globals。您可以通过将session.bug_compat_42或

session.bug_compat_warn分别设置为off来禁用此

功能和此警告。在第0行的Unknown中


我不知道他们在会话副作用下的理解是什么。 as

以及会话扩展以及这个扩展如何可以考虑

的东西。


我试图在新闻组中找到一些东西,我发现:
http://groups.google.com/group/comp....b0666dea7d75fd


但我不确定我是否正确理解建议的解决方案

的问题。我应该用正常变量替换我关心的所有全局变量

?即

Hi,

I set the register_globals off and try to get my code working under
the new conditions. I stuck on the following problem:

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 have no idea what they understand under the "session side-effect" as
well as "session extension" and how this "extension" can "consider"
something.

I tried to find something in the newsgroups and I found that:
http://groups.google.com/group/comp....b0666dea7d75fd

But I am not sure that I correctly understand the suggested solution
of the problem. I should replace all global variables which I care
about by "normal variables"? I.e. $varname = global-array[$varname].
Why I cannot use the global variables directly?

解决方案

varname = global-array


varname].
Why I cannot use the global variables directly?


Kurda Yon wrote:

Hi,

I set the register_globals off and try to get my code working under
the new conditions. I stuck on the following problem:

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 have no idea what they understand under the "session side-effect" as
well as "session extension" and how this "extension" can "consider"
something.

I tried to find something in the newsgroups and I found that:
http://groups.google.com/group/comp....b0666dea7d75fd

But I am not sure that I correctly understand the suggested solution
of the problem. I should replace all global variables which I care
about by "normal variables"? I.e.


这篇关于“register_globals off”和“会话副作用”和“会话副作用”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆