Problem in session due to memcache..

Discussion in 'PHP' started by cool_saran, Dec 11, 2007.

  1. #1
    In our site we redirect the logged user to members folder (for ex: domain/members/contacus/) . if he logged out means, he will be redirected to "domain/contactus/". But if an user logged in means he cannot see the root file ex: "domain/contactus/" .only he can see "domain/members/contactus/". sometimes in logged in condition if an user remove members/ in url directly he can view the root file and session will unset automatically. I think this is happening due to the following reason.

    In our local and test server we are not using memory cache. but in live server client uses memcache functions and also if we compare the phpinfo() file on both testserver and live server, the live server has the following changes in session block. that is "Registered save handlers = files user sqlite memcache". Is it server settings issue or anything else. if its server settings issue means how to resolve this session issue..pls can anyone help me.......
     
    cool_saran, Dec 11, 2007 IP
  2. tonybogs

    tonybogs Peon

    Messages:
    462
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It is a good idea to make sure your production and development servers have all the same modules installed. THat would be my first step, install any missing modules on your testing server.

    Inside /domain/contactus/ can you check if a user is logged in? If the user is logged in then header redirect them to /domain/members/contactus/ . THat way it will be impossible for a user to go to the logged out version of the page.

    Check that your memcache key ttl is also the same as your session timout setting. If they dont match up then your test server and production server will be even more out of sync.

    Hope this helps :)
     
    tonybogs, Dec 11, 2007 IP