ID:               27226
 Updated by:       [EMAIL PROTECTED]
 Reported By:      dayal at capital-merchant dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Arrays related
 Operating System: Unix
-PHP Version:      4.3.4
+PHP Version:      4.3.2
 New Comment:

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.

Works (and has worked) fine with PHP 4.3.4 in production since release.
(heavily using sessions and also storing associative arrays in them)



Previous Comments:
------------------------------------------------------------------------

[2004-02-11 17:43:08] dayal at capital-merchant dot com

Description:
------------
PHP Version: 4.3.2
------------------
Hi,

I am using an associative array as a session variable.
Randomly this variable fails in the sense that all values corresponding
to the keys are lost. 
To see if this problem is specific to associative arrays I have added
another simple variable to the session. The application is able to
retrieve this other variable from the session all the time, even when
the associative array fails.

Is there any problem using associative arrays as session variables in
php??

Reproduce code:
---------------
<?php

session_start();
$ar = array();
$ar["name"] = "xxxx";
$ar["password"] = "yyyyy";
$_SESSION["arrayvariable"] = $ar;
$_SESSION["numericvariable"] = 30;

Header("Location: test2.php");

?>


Expected result:
----------------
test2.php
---------

<?php
session_start();
echo "Your name: ".$_SESSION["arrayvariable"]["name"];
echo "Numeric value: ".$_SESSION["numericvariable"];
?>

Expected Result:
---------------

Your name: xxxx
Numeric value: 30

Actual result:
--------------
Your name: 
Numeric value: 30


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27226&edit=1

Reply via email to