469,623 Members | 883 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,623 developers. It's quick & easy.

Losing session variables

I have a page containing a form. The page submits to itself and if the
data validates, stores the posted variables into a database and also
into a session. I then use header to redirect to another page which
fetches the variables from the session array and displays them.

All works fine on the Linux test server. However the production server
is Windoze running PHP 5. reg globals off I am intermittently losing
variables. from the session array

It's not a register globals issue - sometimes they are there sometimes
not. The only other difference I can see is the session.gc.divisor
which is set to 1000

Anyone come across anything like this?
--
Regards,

Geoff Berrow
Jun 14 '06 #1
2 2321
Tom
Are you session-write-closing before redirect? This may help:

http://www.php.net/manual/en/functio...rite-close.php

Tom

Geoff Berrow wrote:
I have a page containing a form. The page submits to itself and if the
data validates, stores the posted variables into a database and also
into a session. I then use header to redirect to another page which
fetches the variables from the session array and displays them.

All works fine on the Linux test server. However the production server
is Windoze running PHP 5. reg globals off I am intermittently losing
variables. from the session array

It's not a register globals issue - sometimes they are there sometimes
not. The only other difference I can see is the session.gc.divisor
which is set to 1000

Anyone come across anything like this?
--
Regards,

Geoff Berrow


Jun 14 '06 #2
Message-ID: <11*********************@h76g2000cwa.googlegroups. com> from
Tom contained the following:
Are you session-write-closing before redirect? This may help:

http://www.php.net/manual/en/functio...rite-close.php


Thanks Tom, I've actually coded round the problem now but I needed to
know what caused it and that might explain it.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jun 14 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by vivek | last post: by
2 posts views Thread by James | last post: by
3 posts views Thread by ACaunter | last post: by
2 posts views Thread by Jimmy Reds | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.