My thought was to use this until I do all changes. Once the changes are done - turn off magic_quote_gpc in php.ini. but, agree, redo whole site on separate place (under 'new' or on other box) is much better solution. -afan > On Thu, August 10, 2006 7:54 am, afan@xxxxxxxx wrote: >> This is what I found and started to use: created magic_quotes_off.php >> >> if (get_magic_quotes_gpc()) >> { >> function stripslashes_deep($value) >> { >> $value = is_array($value) ? >> array_map('stripslashes_deep', $value) : >> stripslashes($value); >> >> return $value; >> } >> >> $_POST = array_map('stripslashes_deep', $_POST); >> $_GET = array_map('stripslashes_deep', $_GET); >> $_COOKIE = array_map('stripslashes_deep', $_COOKIE); >> } > > The downside here is that having Magic Quotes on has a slight > performance penalty, and then recursing through all the stuff to just > undo that has a slight (but higher) performance penalty. > > While it's unlikely to matter on a boutique site, or even on a > moderately busy site, this would probably not be a Good Idea if > performance is near the top of your list... > > I'm just guessing here -- Maybe all this is so fast it just doesn't > matter. > > Still seems kinda icky to me compared to a simple php.ini or .htaccess > change if you control the environment. > > Obviously, if your source is released to the world at large, and you > have zero control over the environment, you're stuck with this magical > un-do. > > -- > Like Music? > http://l-i-e.com/artists.htm > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php