php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37935 Session variables not being passed
Submitted: 2006-06-27 20:03 UTC Modified: 2006-06-27 20:05 UTC
From: euthdc at cox dot net Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.1.4 OS: Windows XP Pro SP2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: euthdc at cox dot net
New email:
PHP Version: OS:

 

 [2006-06-27 20:03 UTC] euthdc at cox dot net
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-27 20:05 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 16 07:01:33 2024 UTC