473,698 Members | 2,409 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disappearing session variables

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.p hp 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_global s = On and register_global s = 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.
Aug 3 '08 #1
24 4089
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.p hp 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_global s = On and register_global s = 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*******@attgl obal.net
=============== ===

Aug 3 '08 #2
On Aug 3, 1:36*pm, Jerry Stuckle <jstuck...@attg lobal.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.
Aug 3 '08 #3
Pink Pig wrote:
On Aug 3, 1:36 pm, Jerry Stuckle <jstuck...@attg lobal.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*******@attgl obal.net
=============== ===
Aug 3 '08 #4
I'm now pursuing the theory that there's something going on in the
get_browser() function under IE that's causing my problems.
Incidentally, can anyone explain why, when I access a page with IE6,
the value of $_ENV["HTTP_USER_AGEN T"] says that the browser is Mozilla/
4.0?
Aug 4 '08 #5
IE6 returns:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

as it's HTTP_USER_AGENT . Google "HTTP_USER_AGEN T" to get some
references/lists to possible values for the HTTP_USER_AGENT from popular web
browsers.
"Pink Pig" <bi**@grandcent ralapartments.c omwrote in message
news:7c******** *************** ***********@79g 2000hsk.googleg roups.com...
I'm now pursuing the theory that there's something going on in the
get_browser() function under IE that's causing my problems.
Incidentally, can anyone explain why, when I access a page with IE6,
the value of $_ENV["HTTP_USER_AGEN T"] says that the browser is Mozilla/
4.0?

Aug 4 '08 #6
it sounds stupid, but double check that you have session_start()

I did this to myself the other as I was building the front end first
then the backend, made a new script and forgot session_start, DOH!
Aug 4 '08 #7
On Aug 4, 4:57*pm, The Hajj <hajji.hims...@ gmail.comwrote:
it sounds stupid, but double check that you have session_start()

I did this to myself the other as I was building the front end first
then the backend, made a new script and forgot session_start, DOH!
Sorry, I'm battling with the stupid accessibility icon that somebody
thought was a good idea. The last time I tried to reply, it failed at
least 8 times. Maybe somebody should try to make sure that the code is
actually readable.
Aug 5 '08 #8
On Aug 4, 4:57*pm, The Hajj <hajji.hims...@ gmail.comwrote:
it sounds stupid, but double check that you have session_start()

I did this to myself the other as I was building the front end first
then the backend, made a new script and forgot session_start, DOH!
OK, I got a message through, so I'll try again.

I have a session_start at the beginning of every file. It's not
literally the first statement, since I put it into a common header
that gets included in every file, but it works correctly under Firefox
and Opera, so I don't think that that's the problem.

The closest thing that I've heard to a possible explanation is that if
you don't explicit write out the session variables at the end of a
page, then it is possible that the new page is being loaded before the
old page has properly closed. I added an explicit session_write_c lose
everywhere just in case, but that didn't help. FWIW, the behavior is
consistent -- it always fails in exactly the same way every time.
Aug 5 '08 #9
Message-ID:
<a7************ *************** *******@s50g200 0hsb.googlegrou ps.comfrom
Pink Pig contained the following:
>The closest thing that I've heard to a possible explanation is that if
you don't explicit write out the session variables at the end of a
page, then it is possible that the new page is being loaded before the
old page has properly closed. I added an explicit session_write_c lose
everywhere just in case, but that didn't help. FWIW, the behavior is
consistent -- it always fails in exactly the same way every time.
You mentioned the get_browser() function. Is your script designed to
react to different browsers in any way?
--
Geoff Berrow 011000100110110 0010000000110
001101101011011 001000110111101 100111001011
100110001101101 111001011100111 010101101011
http://slipperyhill.co.uk
Aug 5 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3328
by: Larry Woods | last post by:
I have a site that works fine for days, then suddenly, I start getting ASP 0115 errors with an indication that session variables IN SEPARATE SESSIONS have disappeared! First, for background information, I have a customized 500-100 page that sends the value of various session variables via email to my support site. The situation: On the home page of the site, the FIRST THING that is done is a Session
14
3229
by: Paul Yanzick | last post by:
Hello, I am trying to develop a book tracking application for my capstone in school, and am running into a problem. The application is an ASP.Net application written in C#. The first page you go to is a login form, which will set several session variables with the name used to log in, appropriate security level and some other misc variables, and then will go to a main menu for each particular security level using Server.Transfer. ...
1
2095
by: Wiktor Zychla | last post by:
Hello there, I've just encountered a strange problem with Session. In one particular scenario it is cleared between pages but the scenario is so specific that I am really, really startled. I've tried to look for similar situations in the group archive and it seems that few people have observed similar behaviour. None of them, however, got a clear explanation that would correspond to my problem. In my web application I put some...
6
3776
by: ChrisAtWokingham | last post by:
I have been struggling with unexpected error messages on an ASP.NET system, using SQL and C#. The application draws organisation charts, based on data stored in the SQL database. Some of the chart editing processes place a very heavy load on the server as the effects of the edit ripple through the organisation structure, requiring potentially large numbers of rows in one of the tables to be updated. (I have done it this way to make the more...
0
8678
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9166
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2333
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.