Ye old $_SESSION variables :)

Ye old $_SESSION variables :)

am 12.03.2006 21:17:40 von Ron Piggott

I am wondering if


causes the

session_id();

to change or be reset.

Some how my $_SESSION[''] variables are "dumping" when I use the POST
command above.

More importantly I am not sure what to do about it.

Any ideas?

Ron

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Ye old $_SESSION variables :)

am 12.03.2006 21:49:55 von Ron Piggott

I may be wrong --- I am now wondering if some how I am giving a command
elsewhere in the script that is causing the $_session[''] variables to
dump. If anyone is really good at using these could you e-mail me
directly so I could get further help? Ron

On Sun, 2006-03-12 at 15:17 -0500, Ron Piggott (PHP) wrote:
> I am wondering if
>
> >
> causes the
>
> session_id();
>
> to change or be reset.
>
> Some how my $_SESSION[''] variables are "dumping" when I use the POST
> command above.
>
> More importantly I am not sure what to do about it.
>
> Any ideas?
>
> Ron
>

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Ye old $_SESSION variables :)

am 13.03.2006 00:11:38 von Chris

Ron Piggott (PHP) wrote:
> I am wondering if
>
> >
> causes the
>
> session_id();
>
> to change or be reset.
>
> Some how my $_SESSION[''] variables are "dumping" when I use the POST
> command above.
>
> More importantly I am not sure what to do about it.
>
> Any ideas?
>
> Ron
>

I have no idea what "dumping" means. Do you mean they are being emptied?

If they are being emptied, do you have register_globals on or off?

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Ye old $_SESSION variables :)

am 14.03.2006 21:21:09 von Adriaan van Natijne

Try to make a small new script that only contains a form and a session.
Then try a from with the same field names as the variable names.
name='test' => $_SESSION['test'].
When the session data is overwritten by the second try, registerglobals is
switchd on.
The thing you can do then is to rename your form fields. I use:
name='in[YourFieldName]'
This outputs an array:
$_POST =>
in =>
YourFieldName = 'bar'

Adriaan

Op Sun, 12 Mar 2006 15:17:40 -0500, schreef Ron Piggott (PHP):

> I am wondering if
>
> >
> causes the
>
> session_id();
>
> to change or be reset.
>
> Some how my $_SESSION[''] variables are "dumping" when I use the POST
> command above.
>
> More importantly I am not sure what to do about it.
>
> Any ideas?
>
> Ron

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Ye old $_SESSION variables :)

am 14.03.2006 22:15:33 von Matthias Willerich

> Try to make a small new script that only contains a form and a session.
> Then try a from with the same field names as the variable names.
> name='test' => $_SESSION['test'].
> When the session data is overwritten by the second try, registerglobals is
> switchd on.
> The thing you can do then is to rename your form fields. I use:
> name='in[YourFieldName]'
> This outputs an array:
> $_POST =>
> in =>
> YourFieldName = 'bar'
>
> Adriaan

Ayy. If registerglobals should be on, try to turn it off. It just supports
laziness and promotes confusion. But that's just my very subjective opinion.


Checking for registerglobals is a good idea, though, and grouping form
fields into an array is one as well, as long as you stay in php with your
backend.

Also, try fiddling with your cookie settings, if a lower setting solves the
problem, you have to add the session-id to the action in the form tag, i.e.


Ah, and, don't know if you knew or not: You can see what's left of your
session, your post and generally any array with print_r or vardump, i.e.
print_r($_SESSION); print_r($_POST). As other people said, you probably
either forgot to session_start() somewhere, or the post screws up the
transparent session id thingy, or registerglobals is on.

Matthias

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php