Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater laravel [closed] Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater laravel [closed] laravel laravel

Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater laravel [closed]


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 Quotesif (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!


Your website is badly configured. Consult your hosting provider and if they don't turn it off find another host or VPS.