php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35192 Session save not triggered
Submitted: 2005-11-11 11:06 UTC Modified: 2005-11-14 20:37 UTC
From: uap-php at cheeky dot org Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.0.5 OS: Linux - FC 4
Private report: No CVE-ID: None
 [2005-11-11 11:06 UTC] uap-php at cheeky dot org
Description:
------------
I think this has bug has been touched on before but never resolved.  

If you have register_long_arrays=off in your ini file, $_SESSION stuff does work, apart from when you iterate over it.

It seems that if you iterate over $_SESSION, the session_save handler does not get called and the session data is not saved.

If for example you wanted to empty all your session data and you did it by setting each session var seperatly, it works.  If you iterate over $_SESSION, set each $_SESSION[$key]='';  The session data will not get saved.

Reproduce code:
---------------
see http://php.lollyposh.com/session_test.phps

Expected result:
----------------
If run with register_long_arrays=off or on, the value of $_SESSION['search_test'] should be ''

Actual result:
--------------
If run with register_long_arrays=off, the value of $_SESSION['search_test'] will be 'hello!'

If run with register_long_arrays=on, the value of $_SESSION['search_test'] will be ''

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-11 22:08 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-11-14 12:30 UTC] uap-php at cheeky dot org
This bug still appears in build dated php5-200511140930
 [2005-11-14 20:37 UTC] sniper@php.net
It works fine with PHP 5.1.0. (can't reproduce)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 15 23:01:33 2025 UTC