tags:

views:

427

answers:

2

url: page.php?sid=session_id();

php code:
if ($_REQUEST['sid'])
  session_id($_REQUEST['sid']);

session_start();

Question:

im trying to access php session with passing the id, so it continues to login and returns data of the user. session id is successfully transfered, but session getting reset each time, emptying the old session and returning it, which means user gets log out.

any idea why its resetting the session?

A: 

put session_start() in front

Joshmattvander
A: 

the problem was, my server head suhoshin extension install and it encrypts the session and also checks user remote address, if its differenent ip, then it resets the session. so i head to end the suhoshin extension, well kind of block it. :) and it start working again. but with the shushin its more secure for sessions.

Basit