You are here: $_SESSION / $HTTP_SESSION_VARS behaviour « PHP Programming Language « IT news, forums, messages
$_SESSION / $HTTP_SESSION_VARS behaviour

Posted by Michael Windsor on 11/01/06 14:49

I've been trying to integrate some PHP pages of my own with some
existing code. The details of this are for the support forums for that
code (where I have been asking questions), but I wonder if someone here
can enlighten me as to why the problematic code is having the effect it is.

For reasons I don't know, if the PHP version is 5 or greater,
register_long_arrays is false and $_SESSION exists, the following
statement is executed:

$HTTP_SESSION_VARS = $_SESSION;

This line is stopping any subsequent changes to the $_SESSION variable
from being stored in the session file on the server - changes can be
made, but are all lost at the end of the page processing and the value
reverts to whatever it was before the script was executed.

Is this behaviour by design? Why does it happen? Is there a standard
reason why anyone would include a statement like this (security?)?

I'm seeing this behaviour on PHP 5.1.3 / Win 2003 sp1 / IIS 6 and on PHP
5.1.6 / Win XP sp2 / Apache 2.

Thanks for any help!

Regards,
Mike

 

Navigation:

[Reply to this 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

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