Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #376134

    Hi

    Have a problem with Google Maps Widget in Enfold Theme, with te next messages:
    Warning: mysql_real_escape_string(): No such file or directory in /homepages/26/d416598861/htdocs/cristinoweb/wp-content/themes/enfold/framework/php/class-framework-widgets.php on line 1322

    Warning: mysql_real_escape_string(): A link to the server could not be established in /homepages/26/d416598861/htdocs/cristinoweb/wp-content/themes/enfold/framework/php/class-framework-widgets.php on line 1322

    Wordpress and Enfold Theme are updated to latest version.

    #376139

    Hey Sofprint!

    Please try re-updating the theme via FTP and make sure to overwrite all files – http://vimeo.com/67209750

    Best regards,
    Yigit

    #376196

    Re-updated the theme via FTP, overwriting all files but the problem continues.

    #376199

    Hi!

    Can you please try de-activating all active plugins and check if that helps?

    Regards,
    Yigit

    #376207

    Sorry, pluging re-activated, but not help :(

    #376494

    Hey!

    Try Ismael’s fix here, https://kriesi.at/support/topic/problems-php-5-5-google-map-widget/#post-324190.

    Best regards,
    Elliott

    #376711

    Thanks, I changed “functions.php” in enfold folder and “class-framework-widgets.php” with your instructions, but not work.

    #377468

    Hi!

    Try completely deleting Enfold from your WordPress theme directory before downloading + uploading a fresh copy from themeforest and then try adding this to the bottom of your functions.php file.

    if(!function_exists('mysql_real_escape_string_alt')) {
    function mysql_real_escape_string_alt($value)
    {	
    	global $avia_config;
    
        $search = array("\\",  "\x00", "\n",  "\r",  "'",  '"', "\x1a");
        $replace = array("\\\\","\","\\n", "\\r", "\'", '\"', "\\Z");
    
        return str_replace($search, $replace, $value);	
    	}
    }

    And then change line 1322 in /enfold/framework/php/class-framework-widgets.php from this.

    $content = mysql_real_escape_string($content);
    

    To this.

    $content = esc_sql($content);
    

    Best regards,
    Elliott

    #379554

    Thanks for writing, I changed the code in “functions.php” and “class-framework-widgets.php (line 1322)” and now it appears on the web: “Parse error: syntax error, unexpected ‘\’ (T_NS_SEPARATOR), expecting ‘)’ in /homepages/26/d416598861/htdocs/cristinoweb/wp-content/themes/enfold/functions.php on line 523”

    #380177

    Hey!

    Send us a WordPress login.

    Cheers!
    Elliott

    #380189
    This reply has been marked as private.
    #380610

    Hi!

    Please remove the code on functions.php then open up /enfold/framework/php/class-framework-widgets.php and change line 1322:

    $content = mysql_real_escape_string($content);
    

    to:

    $content = esc_sql($content);
    

    Regards,
    Ismael

    #383012

    Hi Ismael,

    we have the same problem. Could you please tell me if the problem will be fixed in the next update of the enfold theme?

    Kind regards

    #383020

    Hey!

    Which version of the theme are you using? Please make sure that you are using Enfold 3.0.5 – http://kriesi.at/documentation/enfold/updating-your-theme-files/

    Regards,
    Yigit

    #383023

    Hi Yigit,
    We are using WordPress 4.1 and the newest version of enfold


    No Updates available. You are running the latest version! (3.0.5)

    regards

    #383535

    Hey!

    Did you try the solution provided above? It should fix the issue for websites using older version of PHP.

    Regards,
    Ismael

    #383578

    Hi Ismael,

    we are using PHP 5.5.2. Is this PHP-version relevant concerning your fix?

    Which PHP Version is recommended ?

    regards

    #384824

    Hi!

    Yes, it is related. The function is deprecated since 5.5.0: http://php.net/manual/en/function.mysql-real-escape-string.php

    Since you’re using an updated version of PHP, the suggested code above should work.

    Replace:

    $content = mysql_real_escape_string($content);
    

    with:

    $content = esc_sql($content);
    

    Regards,
    Ismael

Viewing 18 posts - 1 through 18 (of 18 total)
  • You must be logged in to reply to this topic.