|
From: John W. <jp...@us...> - 2002-04-23 23:14:20
|
This one seems to be causing a lot of problems with people! The problem (on my server anyway) really seems to be that assignments to $HTTP_SESSION_VARS['name'] dont work with regiter_globals 'on', but do with it 'off'. ie $HTTP_SESSION_VARS['one'] = "test"; For information, this is on php 4.0.6 which is the default with redhat 7.2. On more recent versions of php, the $_SESSION looks to be the way to go. On older versions such as 4.0.6, the old session_register method works.... The problem seems to be in trying to find a method that works on both 'old' and 'new' releases. Could a solution - or at least a long-term fix - be to abstract the session variable assignment into a function and to code the function to detect the version of php and use the appropriate method for writing data?? This could be done in such a way that ONLY the session writing code is affected - session variable reading seems to work fine in all cases. john |