Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jan 2006
    Location
    Preston, Lancashire, England
    Posts
    285
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Session dying when moving from https to http

    Hello,

    I am creating a little ecommerce site which has a secure basket. The user can add the item/items to the basket and move to the checkout. The checkout transfers the user from the http to the https via a php header location. This works fine and the user can carry on and complete the order.

    How ever if the user click a link thats not the checkout step two they are redirected to the http. This is also done with the header location. However once redirected and they are at http://sitename.com/page the the contents of the basket have been removed.

    The session is only removed in IE. Firefox is fine.

    Anyone one got any ideas as to what it could be.

    Thank you

    MRMAN

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,502
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    Are you sure you're talking about SESSIONS, or do you mean "cookies"?

    SESSIONS are cookies stored on the webhost server,
    COOKIES are cookies stored on the user's PC.

    They are different.

    To hand-off SESSIONS, see this:
    http://www.google.com/#hl=en&source=...82d86320cf60e9

    Let us know what you really mean.

  • #3
    Regular Coder
    Join Date
    Jan 2006
    Location
    Preston, Lancashire, England
    Posts
    285
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Its the session that gets lost on IE. i an print the contents before the redirect and the session is full of the basket. but after the redirect the session is empty.

  • #4
    Regular Coder
    Join Date
    Dec 2009
    Location
    UK
    Posts
    495
    Thanks
    0
    Thanked 58 Times in 58 Posts
    Take a look at the session_set_cookie_params() function. This should help you (particularly the http only part)
    My site: JayGilford.com
    Resources:
    PHP Pagination Class | Getting all page links | Handling PHP Errors properly
    If you like a users help, show your appreciation with the rep and thanks buttons :)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •