Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in laravel
I don't have access to php.ini file at the server so i can't turn magic_quotes off, i have already tried .htaccess method it didn't work.
You should ask your hosting provider to turn off magic quotes.
If you can't do that, you can use this code to remove magic quotes your self:
// Remove Magic Quotes
if (get_magic_quotes_gpc()) {
$process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
while (list($key, $val) = each($process)) {
foreach ($val as $k => $v) {
unset($process[$key][$k]);
if (is_array($v)) {
$process[$key][stripslashes($k)] = $v;
$process[] = &$process[$key][stripslashes($k)];
} else {
$process[$key][stripslashes($k)] = stripslashes($v);
}
}
}
unset($process);
}
Just put this code somewhere at bootstrap level, or you should put this as first code in your scripts.
I had similar situation where I had PHP 5.3 and magic quotes turned on. Hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With