Magic Quotes is a process that automatically escapes incoming data to the PHP script. However, it can cause issues for your website and you might need to disable it.
Note: Since the release of PHP 5.3.0, this feature has been deprecated.
There are a few ways you can disable Magic Quotes:
magic_quotes_gpc = Offmagic_quotes_runtime = Offmagic_quotes_sybase = Off
If the hosting account does not have a php5.ini
file, you have to add one.
For this change to take effect, you might need to stop your account's PHP process. For more information, see Manage system process (Linux).
Place code at top of the .php file so it executes when the file runs:
<?phpif (get_magic_quotes_gpc()) { function magicQuotes_awStripslashes(&$value, $key) {$value = stripslashes($value);} $gpc = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST); array_walk_recursive($gpc, 'magicQuotes_awStripslashes');}?>
Note: The magic_quotes_gpc directive may only be disabled at the system level, and not at runtime.
For more information regarding Magic Quotes please refer to php.net.