Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call to undefined function set_magic_quotes_runtime() [closed]

Tags:

php

So, on my website I'm getting this error:

Fatal error: Uncaught Error: Call to undefined function set_magic_quotes_runtime() in /homepages/4/d661770438/htdocs/awptical/initdata.php:382 Stack trace: #0 /homepages/4/d661770438/htdocs/awptical/index.php(21): require_once() #1 {main} thrown in /homepages/4/d661770438/htdocs/awptical/initdata.php on line 382

Does anybody know what this means?

like image 883
John Cena Avatar asked Oct 08 '17 12:10

John Cena


1 Answers

The function no longer exists in PHP 7, nor the setting it works with, so you will need to remove its usages. You will need to save the current state of your code and try to remove all the instances of this function call and see whether the site is working and if so, whether it is working as you expect it to work. Alternatively, you can implement a dummy version of the function and make it available everywhere:

if (!function_exists('set_magic_quotes_runtime')) {
    function set_magic_quotes_runtime($new_setting) {
        return true;
    }
}
like image 147
Lajos Arpad Avatar answered Sep 24 '22 00:09

Lajos Arpad