5 replies
Is it possible to carry session data between http://www.mycoolsite.com and https://www.secure.mycoolsite.com. OR do i have to rename my ssl subdomain to https://www.mycoolsite.com to pass session data.:confused:
#php #sessions
  • Profile picture of the author diondevelopment
    ini_set('session.cookie_secure', 1);

    Hope this helps.
    {{ DiscussionBoard.errors[3821200].message }}
  • Profile picture of the author mandrake
    This post might help since you're asking about setting cookies across subdomains
    ubuntuforums.org/showthread.php?t=642640

    sorry I don't have enough posts to put a real link in there yet.
    {{ DiscussionBoard.errors[3821420].message }}
  • Profile picture of the author niftydirectt
    A PHP session variable is used to store information about, or change settings for a user session. Session variables hold information about one single user, and are available to all pages in one application.
    {{ DiscussionBoard.errors[3821445].message }}
    • Profile picture of the author spamfighter
      you could try this:

      php_value session.cookie_domain ".domain.com"
      {{ DiscussionBoard.errors[3829832].message }}
      • Its not that simple and needs additional programming, by storing session data into a file or DB table.

        Originally Posted by http://www.webmasterworld.com/forum88/4832.htm

        Yes this is possible.
        How I did it was to make a secure session table in the database, on links from a non-secure to a secure page, insert the session id into the database with all the session data, add the session id to the url. On the secure server get the session data back from the database and initialise the session with the id sent in the url.
        To add, I think the best way to store a session in the database for future use, is my serializing the data, this way it can be reconstructed exactly as it was.
        {{ DiscussionBoard.errors[3832722].message }}

Trending Topics