Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #321265

    Hey,

    I got Problems with the Google Map Widget since PHP 5.5 Update
    Using WordPress 4 and Enfold 2.9.2

    Displaying this Error Code on the Website:
    Warning: mysql_real_escape_string(): No such file or directory in /homepages/9/d517634603/htdocs/wordpress/wp-content/themes/enfold/framework/php/class-framework-widgets.php on line 1318

    Warning: mysql_real_escape_string(): A link to the server could not be established in /homepages/9/d517634603/htdocs/wordpress/wp-content/themes/enfold/framework/php/class-framework-widgets.php on line 1318

    Need help! Thanks

    • This topic was modified 10 years, 2 months ago by bur2000.
    #321743

    Hi bur2000!

    Thank you for using Enfold.

    Please try editing the said file with the error then look for this code on line 1330:

    $content = mysql_real_escape_string($content);
    

    Replace it with:

    $content = mysqli_real_escape_string($content);
    

    Best regards,
    Ismael

    #321776
    This reply has been marked as private.
    #321899

    I change know the php Version to 5.4, and the old script works.
    But for the future the problem is still there.
    Hope you can fix it in the next Enfold Update

    #324190

    Hey!

    Please try to add this on functions.php:

    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);	
    	}
    }

    Edit the same line of code on the same file then replace it with this:

    $content = mysql_real_escape_string_alt($content);
    

    If that doesn’t work, just use this:

    $content = esc_sql($content);
    

    Best regards,
    Ismael

    #325088

    $content = esc_sql($content);

    worked for me! thank you, Ismael.

    best

    Simon

    #325091

    Hey!

    Glad Ismael could help! We will keep the thread open for OP.
    If you have any other questions or issues, please feel free to start a new one

    Regards,
    Yigit

    #334792

    Hi, this is urgent:
    I added whats written above from #324190 REPLY;
    Than the error was as follows:

    Parse error: syntax error, unexpected ‘\’ (T_NS_SEPARATOR), expecting ‘)’ in /home/.sites/47/site6089695/web/wp-content/themes/enfold/functions.php on line 504

    I deleted the addes lines, and the error is the same, with line 504 not even existing; now the whole site is unavailable with this error!
    http://www.tcm-team.at

    manfred

    #334801

    OK, I uploaded functions.php through ftp, but it was a scary, strange error.
    manfred

    #335262

    Hi!


    @daraemerson
    Is it working fine now?

    Best regards,
    Yigit

    #363999

    I’m not sure of these instructions.. Can you elaborate more please?

    Thanks,

    Ben

    #365049

    Hey Ben!

    Can you paste the PHP error you are getting?

    Best regards,
    Josue

    #367935

    Hi Josue,

    This is pretty darn urgent now…. message below

    “Warning: mysql_real_escape_string(): Access denied for user ‘swaneven’@’localhost’ (using password: NO) in /home/swaneven/public_html/wp-content/themes/replete/framework/php/class-framework-widgets.php on line 1322

    Warning: mysql_real_escape_string(): A link to the server could not be established in /home/swaneven/public_html/wp-content/themes/replete/framework/php/class-framework-widgets.php on line 1322

    Thanks Ben

    #368640

    Hi Ben!

    That error means that the username set in the wp-config.php file can’t access the database, make sure the user (‘swaneven’) exists and correct the credentials if needed.

    Cheers!
    Josue

    #368740

    Everything is fine with this regard – credentials etc…

    Please give me a fix for it.

    Thanks

    #368742

    It’s ok.. the
    $content = esc_sql($content);

    Worked of me thanks!

Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘Problems PHP 5.5 Google Map Widget’ is closed to new replies.