Re: A SESSION Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, December 11, 2007 8:53 am, tedd wrote:
> Hi gang:
>
> I just had this happen and wonder what the fix is for it.
>
> I am sending session data from a script in a http to another script
> in https. However, sometimes the data gets through and sometimes it
> don't.
>
> Any ideas or fixes?
>
> Both scripts are listed below
>
>
> [1]
>
> <?php session_start();
> $x = 'zzz';
> $_SESSION['x'] = $x;
> ?>
>
> <form action="https://example.com/a-session2.php"; method="post">
> <input type="submit" value="Proceed to Step 2">
> </form>
>
>
> [2]
>
> <?php session_start();
> print_r($_SESSION);
> ?>
>
> <form action="http://example.com/a-session1.php"; method="post">
> <input type="submit" value="Proceed back to Step 1">
> </form>

Use FireFox and configure it to ALWAYS ask before accepting a cookie
and see when you are getting a new session or not.

If it happens "sometimes" perhaps you are running code that has or
hasn't changed the cookie parameters to allow the session ID to travel
over secure/insecure HTTP.

It's also possible that you have *another* session going in HTTPS
sometimes, so it only picks up the HTTP one when there isn't already
an active session from another application on HTTPS...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux