-
AuthorPosts
-
January 7, 2015 at 2:30 pm #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 1322Warning: 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.
January 7, 2015 at 2:39 pm #376139Hey Sofprint!
Please try re-updating the theme via FTP and make sure to overwrite all files – http://vimeo.com/67209750
Best regards,
YigitJanuary 7, 2015 at 3:50 pm #376196Re-updated the theme via FTP, overwriting all files but the problem continues.
January 7, 2015 at 3:51 pm #376199Hi!
Can you please try de-activating all active plugins and check if that helps?
Regards,
YigitJanuary 7, 2015 at 3:59 pm #376207Sorry, pluging re-activated, but not help :(
January 7, 2015 at 10:10 pm #376494Hey!
Try Ismael’s fix here, https://kriesi.at/support/topic/problems-php-5-5-google-map-widget/#post-324190.
Best regards,
ElliottJanuary 8, 2015 at 11:42 am #376711Thanks, I changed “functions.php” in enfold folder and “class-framework-widgets.php” with your instructions, but not work.
January 9, 2015 at 5:32 pm #377468Hi!
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,
ElliottJanuary 14, 2015 at 5:29 pm #379554Thanks 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”
January 15, 2015 at 5:43 pm #380177Hey!
Send us a WordPress login.
Cheers!
ElliottJanuary 15, 2015 at 5:48 pm #380189This reply has been marked as private.January 16, 2015 at 7:46 am #380610Hi!
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,
IsmaelJanuary 21, 2015 at 3:05 pm #383012Hi 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
January 21, 2015 at 3:12 pm #383020Hey!
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,
YigitJanuary 21, 2015 at 3:22 pm #383023Hi 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
January 22, 2015 at 7:18 am #383535Hey!
Did you try the solution provided above? It should fix the issue for websites using older version of PHP.
Regards,
IsmaelJanuary 22, 2015 at 10:48 am #383578Hi Ismael,
we are using PHP 5.5.2. Is this PHP-version relevant concerning your fix?
Which PHP Version is recommended ?
regards
January 24, 2015 at 11:00 am #384824Hi!
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 -
AuthorPosts
- You must be logged in to reply to this topic.