473,386 Members | 1,733 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,386 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 9259
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...

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.