ID:               27226
 Comment by:       pappkamerad at decoded dot net
 Reported By:      dayal at capital-merchant dot com
 Status:           Bogus
 Bug Type:         Arrays related
 Operating System: Unix
 PHP Version:      4.3.2
 New Comment:

hmmm... i've the same problem here.

installed horde framework with ingo-filter manager. this is using
hashes like $_SESSION['ingo']['edit']. example: if a edit link is
clicked, than this happens in the target script:

---

$_SESSION['ingo']['edit'] = $id;

header('Location: ' . Horde::applicationUrl('rule.php'));

---

if register_globals is off all works fine. if it is "on", the
$_SESSION['ingo']['edit'] variable is not defined in the rule.php
script.

now if i reload the page (F5) everything is there...

php version is 4.3.4


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

[2004-02-12 10:05:02] [EMAIL PROTECTED]

Read the NEWS file. I don't know if this was specifically fixed in it
or if it was some side-effect of some other bug that was fixed or if
you're doing something wrong. I can just say that this works fine in
PHP versions >= 4.3.3 (used in one other host I have some stuff running
on)



We have no resources to support old versions anyway. If you say you're
using any older PHP version than the latest release it causes the
report to be bogus automatically.



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

[2004-02-11 21:57:12] dayal at capital-merchant dot com

So was this bug present in 4.3.2 and has been rectified in 4.3.4? If
not, what could be the reason why associative arrays are failing when
used as session variables in my case?



I just want to confirm the above before upgrading my php version.



Thanks in advance

Dayal

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

[2004-02-11 19:59:19] [EMAIL PROTECTED]

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)



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

[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