i have been wondering. on a 2.5.2. test envoirment site it seems that sessions ( s::get s::set ) only works within āprivate modeā across several browsers for me. while another site works fineā¦
the thing is, there is no error whatsoever, all tasks run like they are supposed to however a session - or session values are not written when i try to dump the sessions contents it returns empty.
without any change i then run a private mode and try it again (my application is some kind of shopping cart) and it works fine.
is there anything i am missing? i have checked my code many times to see if itās related there ā¦
s::start();
$session = s::get('cart');
// changed it to make it very simple - as digital product i'll never need to increase qty
if(param('add')){
$session[param('cat')][param('add')] = 1;
s::set('cart', $session);
go(url::last().'#'.param('add'));
}
if(param('del')){
unset($session[param('cat')][param('del')]);
if(empty($session[param('cat')])) unset($session[param('cat')]);
s::set('cart', $session);
go(url::last());
}
dump(s::get('cart'));
// incognito works fine, normal access doesn't seem to work.
// Result (s::get('cart')) on incognito array(hash)(filenme)
Array
(
[pmxo3k] => Array
(
[18-55-58.jpg] => 1
[18-56-58.jpg] => 1
)
[13nctcc] => Array
(
[0001-20-15-46.jpg] => 1
[0008-20-19-53.jpg] => 1
)
)
on https seems to work, http doesnāt.