#26434 [Opn->Fbk]: filling new _session variable doesn't work

From: Date: Thu, 27 Nov 2003 19:07:13 +0000
Subject: #26434 [Opn->Fbk]: filling new _session variable doesn't work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-51171@lists.php.net to get a copy of this message
ID: 26434 Updated by: iliaa@php.net Reported By: ahc at ahc dot cz -Status: Open +Status: Feedback Bug Type: Session related Operating System: Linux PHP Version: Irrelevant New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Previous Comments: ------------------------------------------------------------------------ [2003-11-27 05:37:27] 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26434&edit=1

« previous php.bugs (#51171) next »