Closed Thread Icon

Topic awaiting preservation: Your script possibly relies on a session side-effect which existed until PHP 4.2.3 (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=32027" title="Pages that link to Topic awaiting preservation: Your script possibly relies on a session side-effect which existed until PHP 4.2.3 (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Your script possibly relies on a session side-effect which existed until PHP 4.2.3 <span class="small">(Page 1 of 1)</span>\

 
Hustluz
Bipolar (III) Inmate

From:
Insane since: Jun 2003

posted posted 10-21-2010 04:06

im building an site that is 100% object based it involve manipulating a multidimensional session array for a shopping cart. I also use a multidimensional post array which i use to post products to the shopping cart. I am running into this error and i am not sure what to do on correcting it. Can someone please tell me more about this error and maybe a way i could work towards fixing it?

Error:

Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively in Unknown on line 0

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 10-21-2010 20:38

This warning is usually triggered by having a variable in global context with the same name as a variable that's stored inside session:

global $globalvarname;
$_SESSION['globalvarname'] = 'whatever';

Also, variable doesn't necessary have to be defined as global, sharing the same name will also trigger the warning:

$_SESSION['samename'] = NULL;
$samename = 'something';

The solution for this is to simply rename your (global) variable.


Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 10-22-2010 14:16

boy am I glad I'm rid of this awful language for now.

« BackwardsOnwards »

Show Forum Drop Down Menu