ID: 45939 User updated by: robemail at gmail dot com Reported By: robemail at gmail dot com Status: Open Bug Type: Session related Operating System: XP PHP Version: 5.2.6 New Comment:
1. I meant to tell you that the linux web server is Apache. 2. And that the function that consumes the concatenated session and user variable is in one of the include files. Also, I tried putting the start_session first, still no joy. I also tried placing the php in an html formated page, ie placing the basic html/header/body tags around the php code...still no joy. Previous Comments: ------------------------------------------------------------------------ [2008-08-28 03:48:04] robemail at gmail dot com Description: ------------ Have a php page on a linux web server. Access it publicly, over the internet, in XP with MS IE, and all is ok: You see: AmazingBob. If you use plink, or any ssh tunneling software, to establich an SSH tunnel, and access the page via a redirected port, you only get: Bob Somehow the includes or the $_SESSION vars are all empty. (This may not be a bug if I missed something, but please tell me! like - should I call session_start prior to includes to get it to work?) Reproduce code: --------------- <?php header("Cache-Control: no-cache, must-revalidate"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // set up session vars in includes include('this_file.php'); include('that_file.php'); // Setup the sessions session_start(); //get the url param $urlparam = $_GET['myparam']; //if the include set up $_SESSION[SsessionVar] to //be the string "Amazing" $newvar = $_SESSION[SsessionVar]$urlparam; echo '$newvar'; //To see good results (AmazingBob) call this with //http://1.1.1.1/thepage.php?myparam=Bob //To see problem, call the web page after setting up ssh tunnel as //http://localhost:8080/thepage.php?myparam=Bob ?> Expected result: ---------------- AmazingBob Actual result: -------------- Bob ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45939&edit=1