From: ahc at ahc dot cz
Operating system: Linux
PHP version: Irrelevant
PHP Bug Type: Session related
Bug description: filling new _session variable doesn't work
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 bug report at http://bugs.php.net/?id=26434&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26434&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26434&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26434&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26434&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26434&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26434&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26434&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26434&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26434&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26434&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26434&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26434&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26434&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26434&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26434&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26434&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26434&r=float