473,231 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

Session data lost in Firefox

I've got a 4-page form that lets users enter a whole lot of information,
which is then submitted and emailed at the end. All the fields are
stored as session data.

The whole thing works fine:

1. On my local box (WinXP / Apache2 / PHP4) using IE6
2. On my local box using Firefox1
3. On my hosted server (RHLinux / Apache1.3 / PHP4) using IE6

But when I try it:

4. On my hosted server using Firefox1

Then every time I continue to the next page of the form, all session
data is lost, except for the fields that were just submitted on the
previous page.

So say, for example, you're on page 4 of the form. Everything submitted
on page 3 is stored as session data, but the stuff from pages 1 and 2 is
gone.

I'm storing the session data using cookies - I think this is where the
problem may be. Is Firefox somehow losing the cookie everytime it goes
to a new page?

I'm using the $_SESSION[] variable directly, not ever using
session_register(). I'm calling session_start() at the start of each
page. In my php.ini, I have session.use_only_cookies on, and
session.use_trans_sid off.

Any ideas? This is really frustrating me - I'm tearing my hair out
trying to get it to work!

Cheers,
Jeremy.
Jul 17 '05 #1
3 9250
Jeremy Epstein wrote:
I've got a 4-page form that lets users enter a whole lot of information,
which is then submitted and emailed at the end. All the fields are
stored as session data.

The whole thing works fine:

1. On my local box (WinXP / Apache2 / PHP4) using IE6
2. On my local box using Firefox1
3. On my hosted server (RHLinux / Apache1.3 / PHP4) using IE6

But when I try it:

4. On my hosted server using Firefox1


Cookie policy in Firefox? Clear all your cookies, start a session, check for
cookies.

HTH

C.
Jul 17 '05 #2
Colin McKinnon wrote:
Cookie policy in Firefox? Clear all your cookies, start a session, check for
cookies.


The problem gets weirder and weirder...

I've set the session.save_path in my php.ini to a special ~/sessions
directory. When I open a new session, the session info comes up in
Firefox's cookie list, and the session appears as a new file in my
~/sessions directory.

Each time that I hit 'continue' in IE, I check the file in the
~/sessions directory, and it has new data in it. However, each time that
I hit 'continue' in Firefox, the file is still blank! So Firefox is able
to initiate the session, on the client and the server side (just like
IE), but it's not able to save any data to it.

I also tried this in Opera 7, btw, and it works fine just like in IE.
Also tried it on Firefox using a different machine, with same results.
So it's not because of any particular problem with my Firefox install. I
added the site to my list of allowed cookie sites in Firefox - made no
difference.

This is all so weird - everything is being handled by PHP, and the
session data is getting saved to a file on the server - so shouldn't
this all be a server-side process that's totally browser independent? I
can't even work out why using a particular browser matters! Is Firefox
sending the post data wrong, or something?

Jeremy
Jul 17 '05 #3
*** Jeremy Epstein wrote/escribió (Mon, 23 May 2005 14:09:22 +1000):
I'm storing the session data using cookies - I think this is where the
problem may be. Is Firefox somehow losing the cookie everytime it goes
to a new page?


Do you access the hosted site using always the same domain name?

I mean: if you set a cookie for www.example.com it won't be sent to
example.com and viceversa.
--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Jul 17 '05 #4

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

Similar topics

7
by: Billy Jacobs | last post by:
I am having a problem with my session variable being set to Null for no apparent reason. I am declaring it like the following when the user logs in. dim objUserInfo as new clsUserInfo 'Set...
3
by: William | last post by:
Hi I have an ASP.NET application that connects to an Access database. Everything works fine except for the Session object. Data in the session object is lost after I've made a call to the...
13
by: Alexander Widera | last post by:
hi, who has seen the follow problem or could help please? i visit a page .... i read a sesssion-var . ... everythink works...... i visit the page again..... error ... the sessionvar is null .... i...
2
by: competitions | last post by:
I notice that others have had this problem, after scanning Google, but I couldn't find any solution. I have tested my PHP code on both Mac's & PC's and on several browsers (Firefox, Safari, IE...
7
by: Erik | last post by:
I have an application that uses sessions variables a lot but one I publish the application on the prod server these variables are lost. The application is written i c# 2.0 and I've set the...
3
by: manonoc | last post by:
Hi everyone, This appears only under IE, under Firefox there is no problems: the session is lost, when i use the DNS name in the url (if i use the ip adress, or the server name, there is no...
4
by: rgparkins | last post by:
Hello I am running out of time with a problem I have running PHP 5.04 and Apache 2.0 and really need help :(. I have a page that stores a variable in session but each time I reload that page the...
43
by: davidkoree | last post by:
I mean not about cookie. Does it have something to do with operating system or browser plugin? I appreciate any help.
3
by: dihola | last post by:
Hi, I have a website running in IIS7 and it seems to be creating a new session for every request I make. The values I store in Session are lost with every request. This is the forms bit in my...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...

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.