Quote from: jusmeig at Apr 29, 2011, 10:32 AM
have u another snippet running that may be killing your session?
Nope, pretty sure not. I have been testing it all morning and had just come here to post my findings when I saw your note, so I thought I’d reply to that first.
But here’s what I have found:
Using the little php snippet I mentioned earlier
<?php
foreach($_SESSION as $varname => $varvalue) {
echo $varname . ": " , $varvalue . "
";
}
?>
I can easily demonstrate that, with modx manager
not running, the code
<?php
$_SESSION[’abc’] = ’Hello’;
?>
HTML stuff
<?php
echo $_SESSION[’abc’] . ’
’;
?>
Does what it should: displays "Hello". However, with modx manager
running (and nothing else changing) it produces a blank. The session variable ’abc’ still appears in the list of all session variables, but it is empty (or blank, I’m still not sure how to tell the difference in PHP) instead of "Hello".
So my question is: is this a
bug or a
feature? So far it’s caused me quite a headache, and I can’t fathom why it’s doing what it seems to be doing.
I greatly appreciate any other input into this.
Best regards,
- Dave