From:             euthdc at cox dot net
Operating system: Windows XP Pro SP2
PHP version:      5.1.4
PHP Bug Type:     Session related
Bug description:  Session variables not being passed

Description:
------------
System:
Apache 2.0.58
PHP 5.1.4
Windows XP Pro SP2

PHP.ini changes: 
short_open_tag = On
upload_tmp_dir = C:\php\uploadtemp
session.save_path = "C:\php\sessions"

Problem:
Session variables not being passed.

Reproduce code:
---------------
<?
session_start();

if (isset($_POST['username'])) {
        $_SESSION = $_POST;
}

if ($_SESSION['username'] != "myuser" OR $_SESSION['password'] !=
"mypass") {
        print "<form enctype=\"multipart/form-data\" method=\"post\"
action=\"".$_SERVER['PHP_SELF']."\">
        <input type=\"Text\" name=\"username\"><BR><input type=\"Password\"
name=\"password\"><BR><input type=\"Submit\" value=\"Login\">
        </form>";
        die();
}

?>

You are logged in!<BR>
You will clear the $_SESSION variable by clicking 
<a href="<?=$_SERVER['PHP_SELF']?>">here</a>.

Expected result:
----------------
Once logged in, the page should look identical before and after clicking
the link.

Actual result:
--------------
Once logged in, clicking the link requires you to login again because the
$_SESSION variable is not being passed.

-- 
Edit bug report at http://bugs.php.net/?id=37935&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37935&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=37935&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37935&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37935&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37935&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37935&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37935&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37935&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37935&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37935&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37935&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37935&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37935&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37935&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37935&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37935&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37935&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37935&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37935&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37935&r=mysqlcfg

Reply via email to