Session variables getting over-written

I’m running PHP4 (as CGI) and have recently noticed a problem with my session variables that wasn’t there a week ago. I’ve got a bunch of data stored in session (eg. $_SESSION[‘stuff’]) and noticed that any PHP code that sets a variable with the same name as the index (eg. $stuff) is wiping-out the session variable. Does anyone know if there is a PHP setting that is causing this (like register_globals)? I’ve tried changing several PHP settings using the ini_set method without any luck. Could there have been a change in the PHP4 set-up on DreamHost that might have caused this to start happening? Any help or suggestions would be very appreciated.

Without doing the init_set call, try making a page that calls php_info to see what the settings are.

:cool: [color=#6600CC]Atropos[/color] |

Can do. Got it here…

Of course it is register_globals, and using ini_set() won’t work - it is too late!

You’ll need to either switch to PHP 5 if you can, or follow these directions but modify them to turn off register_globals:

:cool: [color=#6600CC]Atropos[/color] |

Thanks Atropos7. I really appreciate the help.