Skip to content
Advertisement

get_magic_quotes_gpc() returns undefined in my code

I just installed a new version of XAMPP and the site that used to work perfectly now no longer works, I suppose it’s a PHP incompatibility, can anyone help me? tnks in adv..

Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in D:xampphtdocsindex.php:207 Stack trace: #0 {main} thrown in D:xampphtdocsindex.php on line 207
    \ The path to the "application" folder
    if (is_dir($application_folder))
    {
        define('APPPATH', $application_folder.'/');
    }
    else
    {
        if ( ! is_dir(BASEPATH.$application_folder.'/'))
        {
            exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
        }

        define('APPPATH', BASEPATH.$application_folder.'/');
    }

    if(get_magic_quotes_gpc())
    {
        function stripslashes_gpc(&$value)
        {
            $value = stripslashes($value);
        }
        
        array_walk_recursive($_GET, 'stripslashes_gpc');
        array_walk_recursive($_POST, 'stripslashes_gpc');
        array_walk_recursive($_COOKIE, 'stripslashes_gpc');
        array_walk_recursive($_REQUEST, 'stripslashes_gpc');
    }

thanks @WiatroBosy for your help.

I think I solved the problem because the message has now changed and has diverted the error to another file.. I solved the first problem like this..(I don’t know if I did it right)

if(  function_exists("get_magic_quotes_gpc") && get_magic_quotes_gpc())

The new error now is:

Fatal error: Cannot declare class CI_Log, because the name is already in use in D:xampphtdocssystemlibrariesLog.php on line 27 (line 27) class CI_Log {

Advertisement

Answer

This function has been DEPRECATED as of PHP 7.4.0. Relying on this function is highly discouraged.

Read the documentation of get_magic_quotes_gpc()

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement