hi there,
i have i little problem with my php code...
generally, it's written in a way that any setting of register_globals, magic_quote_gpc and all the other stuff won't matter. i think, this stable (and sometimes a little complex) coding is needed to create an application that can be run just anywhere without any environment modification 🆒
but one thing won't work yet, when register_globals is set 'on' (as is often at isps nowadays):
i have a $SESSION variable called 'user', and it contains the currently logged in user, this is a string. now i have one page that makes use of the variable $user in file scope, which has an array with more information on that user in it. no problem with reg_glob's = off, works absolutely fine - but when it's on, this $user simply overwrites my $SESSION['user'].
i had to apply some tricks at common initialization time of my app, like unquoting all those incoming arrays and setting some ini values more friendly to my app. but what i'd like to do is ini_set('register_globals', 0); which won't work. that's documented so, i know.
but there must be a chance to avoid my application to overwrite some essential SESSION vars just by setting around some variables... does it? if anyone out there knows what i mean and has a solution for that, please let me know.
ah, ya, i'm using php as cgi, so i can't set any .htaccess values or so. and i'd like to let reg_globs set to on as long as i anyhow can. it's going to be a webhosting server, and i know many hobby programmers out there who just don't care about that, so i want to 'help' them a little with that. (not interested in too many php help requests saying my server wouldn't work...)
the other app is a bulletin board, that absolutely must be compatible to such environments, but i don't use the same vars' names there, for my luck...