Reply to Sessions and register_long_arrays

Your name:

Reply:


Posted by Marcus Bointon on 06/16/08 11:31

Strange behaviour that's taken me ages to track down. I have the
situation where I can create a session, but any changes to it are not
saved. session_write_close() didn't help. Eventually I tracked it
down: if you have register_long_arrays disabled (as is the default in
PHP5), this can happen. Enabling it fixed the problem. A very simple
test case didn't show this problem, so I guess something in my
sessions has a dependency on HTTP_GET_VARS or similar, though these
old-style vars do not appear anywhere in my code... Some of the
libraries I'm using may use them (for example Smarty, though I have
the request_use_auto_globals option enabled for that which should
stop it using them), but nothing to do with them is stored in the
session. If I look at a session file, it's all just scalars and
arrays, no complex types at all, but changing an item in $_SESSION
simply does not get saved back to the session file if
register_long_arrays is enabled.

Anyone else seen this? Any idea why it might be happening?

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
marcus@synchromedia.co.uk | http://www.synchromedia.co.uk

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация