Sessions with bootstrap.php

Discussion in 'aMember Pro v.4' started by gogoseo, Nov 26, 2013.

  1. gogoseo

    gogoseo Member

    Joined:
    Nov 17, 2012
    Messages:
    36
    Hello,

    all my session variables that i set with $_SESSION are replaced when i forward ....header("Location:").... to a file(mymemberstuff.php) that is supposed to do some amember related stuff and includes the "require_once '.../amember/bootstrap.php';"

    Is there a conflict between "normal" sessions and sessions that come after bootstrap.php file?
    How could i "save" my sessions so i would access them inside the mymemberstuff.php file?
  2. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    Hey,

    Please go to aMember CP -> Configuration -> Setup/Configuration -> Advanced scroll page down and change Session Storage to Standard PHP Sessions
  3. gogoseo

    gogoseo Member

    Joined:
    Nov 17, 2012
    Messages:
    36
    Is there any other way...could i include the bootstrap.php in my other files and save the season with some amember functions? ...among other things this installation in integrated with wordpress and some custom modifications have been done...so im afraid changing the session storage type will break something...
  4. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    Changing of Session Storage should not break anything. Yes, in case you include bootsrap.php in file where you set session variables you will be able to see these session variables in your other file - mymemberstuff.php
  5. gogoseo

    gogoseo Member

    Joined:
    Nov 17, 2012
    Messages:
    36
    Thank you. Including the bootstrap.php in all files worked :)

Share This Page