SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist
    Join Date
    Nov 2003
    Location
    Brisbane, Australia
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Get Cookie Information While In https

    Hi All

    I have never really done anything with https before and am on a major learning curve right now.

    As part of the tool I am building I have put a couple of cookies in to store some info that is needed through the process.

    At one point I switch the page to https. When there I cannot access the cookie anymore.

    How can I access the information in the cookie?

    Thanks for any help.

    mrmbarnes

  2. #2
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    IIRC, cookies are only concerned with the domain and therefore should be ignorant as to whether what protocol is being used.

    Are you switching between (sub-)domains at all?
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  3. #3
    SitePoint Evangelist
    Join Date
    Nov 2003
    Location
    Brisbane, Australia
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey

    Thanks for your reply.

    I'm dropping the www off. Does that make a difference?

    Mrmbarnes

  4. #4
    SitePoint Wizard bronze trophy Immerse's Avatar
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    1,661
    Mentioned
    7 Post(s)
    Tagged
    1 Thread(s)
    It might. Is the public (i.e. non-https) site running on www.?
    Check your cookie using Firebug or something similar? If the cookie is written to use www.yoursite.com as domain, it will not be accessible on yoursite.com

    Check out the setcookie manual page to see how you can set the domain:
    http://php.net/manual/en/function.setcookie.php

    [hint] if you set the domain as .yoursite.com it'll be available on all subdomains. [/hint]


Bookmarks

Posting Permissions

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