Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Pass php sessions to subdomains

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #38969
    schart
    Participant

    I have found a couple of answers, some need cookies some don’t. I don’t want cookies. Also the other answers needed access to the php.ini which in my case and many others is restricted. So I’m just wondering: Is there any way I can pass php sessions (php_session()) over subdomains without using cookies OR php.ini? I honestly don’t think so, but if there is please comment below

    Thank you.
    – Schart

    #106337
    SgtLegend
    Member

    Even setting a cookie wouldn’t work unless you modified the php.ini file as security measures built into browsers and the PHP core forbid the access of both sessions and cookies that aren’t the same domain as the origin, one thing people are suggesting which i think is risky is saving the session to a database which both domains have access to and redirect the user with a session id as part of the query string in the URL and update the session_id on the new domain.

    Personally i feel there is a lot of room for things to go wrong doing it that way so i wouldn’t recommend even trying it but it’s up to you whether you want to or not, apart from that editing your php.ini file is the most assured way to go about doing this.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.