Set session by hand

From: Date: Mon, 28 Apr 2003 15:12:49 +0000
Subject: Set session by hand
Groups: php.general 
Request: Send a blank email to php-general+get-145535@lists.php.net to get a copy of this message
Hello, CONTEXT: I have two scripts : init.php, show.php * init.php sets $_SESSION['test'] = 'youpi' and prints session_id() * show.php starts session with session_id($_GET['my_sess_id']) and shows session variables echo $_SESSION['test']; PROBLEM: When i request init.php, then i request show.php?my_sess_id=XXXXXX, where XXXXX is what init.php has printed, it works. When i request init.php, then i request show.php?my_sess_id=XXXXXX FROM ANOTHER IP ADDRESS, the session is not loaded !! Is it normal ? Anyone have an idea to solve my problem ? SOURCES: init.php <?php session_start(); $_SESSION['test'] = 'youpi'; echo session_id(); ?> show.php <?php session_id($_GET['my_session_id']); session_start(); echo $_SESSION['test']; //print nothing echo session_id() ; //print $_GET['my_session_id'] ?>

« previous php.general (#145535) next »