From: robemail at gmail dot com
Operating system: XP
PHP version: 5.2.6
PHP Bug Type: Session related
Bug description: Session empty inside SSH tunnel
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 bug report at http://bugs.php.net/?id=45939&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=45939&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=45939&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=45939&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45939&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=45939&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45939&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45939&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45939&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45939&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45939&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=45939&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=45939&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45939&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45939&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45939&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45939&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45939&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45939&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45939&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45939&r=mysqlcfg