消失的会话变量 [英] Disappearing session variables

查看:85
本文介绍了消失的会话变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试追踪一个令人烦恼的问题,这个问题只会在我使用IE6访问远程服务器上的页面时发生。如果我从localhost运行

,IE6工作正常,如果我在

远程站点上使用另一个浏览器,则没有问题。


我不是在寻找帮助调试。我只想指出

朝着正确的方向发展。


基本上,这是怎么回事。当我启动时(即在我的网站上加载

index.php),我就退出了。当我登录时,我转到

logincheck.php,它验证登录并将控制权转回给index.php,并将一些会话变量设置为指示我am

登录。到此为止,一切都适用于所有浏览器和

位置。接下来,我执行数据库搜索,转到

searchresults.php进行实际工作,将结果填入

会话变量,然后返回index.php。当我使用IE6在

远程站点上执行此操作时,搜索设置的会话变量为

,但登录变量已丢失,因此我看起来像

再次退出。


我试过了register_globals = On和register_globals = Off

没有改变行为。


有没有人知道可能导致这种情况发生的原因?对于

记录,localhost和远程站点之间存在差异。

我在本地运行PHP 5.2.3,但远程版本是5.0.5。还有

也可能是其他相关的差异。

解决方案

Pink Pig写道:


我正在尝试追踪一个令人讨厌的问题,这个问题只发生在我使用IE6访问远程服务器上的页面时。如果我从localhost运行

,IE6工作正常,如果我在

远程站点上使用另一个浏览器,则没有问题。


我不是在寻找帮助调试。我只想指出

朝着正确的方向发展。


基本上,这是怎么回事。当我启动时(即在我的网站上加载

index.php),我就退出了。当我登录时,我转到

logincheck.php,它验证登录并将控制权转回给index.php,并将一些会话变量设置为指示我am

登录。到此为止,一切都适用于所有浏览器和

位置。接下来,我执行数据库搜索,转到

searchresults.php进行实际工作,将结果填入

会话变量,然后返回index.php。当我使用IE6在

远程站点上执行此操作时,搜索设置的会话变量为

,但登录变量已丢失,因此我看起来像

再次退出。


我试过了register_globals = On和register_globals = Off

没有改变行为。


有没有人知道可能导致这种情况发生的原因?对于

记录,localhost和远程站点之间存在差异。

我在本地运行PHP 5.2.3,但远程版本是5.0.5。还有

也可能是其他相关的差异。



这很奇怪 - 您使用的浏览器没有任何东西使用会话数据执行
- 只有会话ID保存在cookie中。

数据本身在服务器上,并且完全独立于浏览器中的其他任何内容。


整体根本就没有意义。


-

==================
删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================


8月3日,1:36 * pm,Jerry Stuckle< jstuck ... @ attglobal.netwrote:


完全没有任何意义。



我知道 - 这就是为什么我的头撞在墙上。


最后一个那时候我遇到了一个令人困惑的问题,原来这是一个字符串中无法匹配的撇号,但这次我已经验证过

HTML之后,在那里找不到任何错误。


Pink Pig写道:


8月3日,下午1点36分,Jerry Stuckle< jstuck ... @ attglobal.netwrote:


>完全没有任何意义。



我知道 - 这就是为什么我的头靠在墙上。


最后一个那时候我遇到了一个令人困惑的问题,原来这是一个字符串中无法匹配的撇号,但这次我已经验证过

HTML之后,在那里找不到任何错误。



这不会出现在html中 - html与会话数据无关。


我能理解如果会话信息与服务器相关

- 例如,您可能在

失败的情况下在会话中存储了太多数据。但同样,这与浏览器无关,

,除非你在会话中存储与浏览器相关的信息。


-

==================

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================


I''m trying to track down an annoying problem that only occurs when I
access my pages on a remote server using IE6. If I run instead run
from localhost, IE6 works fine, and if I use another browser on the
remote site, there are no problems.

I''m not really looking for help debugging. I''d just like to be pointed
in the right direction.

Essentially, what happens is this. When I start up (i.e. load
index.php on my site), I am logged out. When I log in, I go to
logincheck.php, which validates the login and transfers control back
to index.php with a few session variables set to indicate that I am
logged in. Up to here, everything works with all browsers and
locations. Next, I execute a database search, which goes to
searchresults.php to do the actual work, stuffs the results into
session variables, and returns to index.php. When I do this on the
remote site using IE6, the session variables set by the search are
present, but the login variables have been lost, so that I appear to
be once again logged out.

I''ve tried with both register_globals = On and register_globals = Off
with no change of behavior.

Does anyone have a clue what could be happening to cause this? For the
record, there are differences between localhost and the remote site.
I''m running PHP 5.2.3 locally, but the remote version is 5.0.5. There
may be other relevant differences as well.

解决方案

Pink Pig wrote:

I''m trying to track down an annoying problem that only occurs when I
access my pages on a remote server using IE6. If I run instead run
from localhost, IE6 works fine, and if I use another browser on the
remote site, there are no problems.

I''m not really looking for help debugging. I''d just like to be pointed
in the right direction.

Essentially, what happens is this. When I start up (i.e. load
index.php on my site), I am logged out. When I log in, I go to
logincheck.php, which validates the login and transfers control back
to index.php with a few session variables set to indicate that I am
logged in. Up to here, everything works with all browsers and
locations. Next, I execute a database search, which goes to
searchresults.php to do the actual work, stuffs the results into
session variables, and returns to index.php. When I do this on the
remote site using IE6, the session variables set by the search are
present, but the login variables have been lost, so that I appear to
be once again logged out.

I''ve tried with both register_globals = On and register_globals = Off
with no change of behavior.

Does anyone have a clue what could be happening to cause this? For the
record, there are differences between localhost and the remote site.
I''m running PHP 5.2.3 locally, but the remote version is 5.0.5. There
may be other relevant differences as well.

This is strange - the browser you''re using doesn''t have anything to do
with the session data - only the session id is kept in a cookie. The
data itself is on the server, and should be completely independent of
anything else in the browser.

The whole thing makes no sense at all.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


On Aug 3, 1:36*pm, Jerry Stuckle <jstuck...@attglobal.netwrote:

The whole thing makes no sense at all.

I know -- that''s why I''m beating my head against the wall.

The last time I had a baffling problem like this, it turned out to be
an unmatched apostrophe in a string, but this time I''ve validated the
HTML both before and after, and there are no errors to be found there.


Pink Pig wrote:

On Aug 3, 1:36 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:

>The whole thing makes no sense at all.


I know -- that''s why I''m beating my head against the wall.

The last time I had a baffling problem like this, it turned out to be
an unmatched apostrophe in a string, but this time I''ve validated the
HTML both before and after, and there are no errors to be found there.

That wouldn''t be in the html - html has nothing to do with session data.

I could understand if the session information was related to the server
- for instance, you might be storing too much data in the session in the
failing case. But again, this has nothing to do with the browser,
unless you''re storing browser-related information in the session.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


这篇关于消失的会话变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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