MyBB Community Forums

Full Version: Stripslashes problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I've a problem with mybb and I hope someone can help me.
Yesterday i changed my web host; As I do a lot of time (I never find a good host ç_ç), I've transfered all the files and the databases. But I found a problem: If I write something like:
'dad
=== OR ====
/dad

When I post it, becomes:
/'dad
=== OR ====
///dad

What should I do? Is it a mybb problem or a database problem?
Thanks for your time Wink
Your host needs to disable magic quotes.
(2011-01-10, 04:19 PM)MattRogowski Wrote: [ -> ]Your host needs to disable magic quotes.
EDIT: Done, it works. Thanks man! Smile
I put this code in functions.php:
if ( in_array( strtolower( ini_get( 'magic_quotes_gpc' ) ), array( '1', 'on' ) ) )
{
    $_POST = array_map( 'stripslashes', $_POST );
    $_GET = array_map( 'stripslashes', $_GET );
    $_COOKIE = array_map( 'stripslashes', $_COOKIE );
}