php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26434 filling new _session variable doesn't work
Submitted: 2003-11-27 05:37 UTC Modified: 2003-11-27 14:48 UTC
From: ahc at ahc dot cz Assigned:
Status: Not a bug Package: Session related
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
 [2003-11-27 05:37 UTC] ahc at ahc dot cz
Description:
------------
After filling variable $_SESSION["user_id"] I was unable to fill any other new $_session variable.

PHP version 4.3.1

Reproduce code:
---------------
session_start(); 
if (!empty($_REQUEST["auth_user"])) $_SESSION["user"]=$_REQUEST["auth_user"]; 
if (!empty($_REQUEST["auth_pass"])) $_SESSION["pass"]=$_REQUEST["auth_pass"]; 
if (!empty($_SESSION["userRow"])) return;

$result=execQuery("SELECT * FROM table_name WHERE user_name=\"".$_SESSION["user"]."\" AND user_password=\"".md5($_SESSION["pass"])."\" AND user_active=1"); 

$_SESSION["userRow"]=mysql_fetch_assoc($result);


$_SESSION["user_id"] = $_SESSION["userRow"]["user_id"];
$_SESSION["user_num"] = $_SESSION["userRow"]["user_num"];


Expected result:
----------------
$_SESSION["user_num"] should be filled with the content of $_SESSION["userRow"]["user_num"]

Actual result:
--------------
$_SESSION["user_num"] is not filled.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-27 14:44 UTC] ahc at ahc dot cz
I'm sorry, I cannot use it, I'm not the admin of the server.
 [2003-11-27 14:48 UTC] iliaa@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

Marking bogus until can be verified in newer version.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 10:01:32 2024 UTC