-
AuthorPosts
-
September 18, 2014 at 4:07 pm #321265
Hey,
I got Problems with the Google Map Widget since PHP 5.5 Update
Using WordPress 4 and Enfold 2.9.2Displaying 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 1318Warning: 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, 3 months ago by bur2000.
September 19, 2014 at 9:19 am #321743Hi 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,
IsmaelSeptember 19, 2014 at 10:07 am #321776This reply has been marked as private.September 19, 2014 at 2:58 pm #321899I 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 UpdateSeptember 24, 2014 at 12:22 pm #324190Hey!
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,
IsmaelSeptember 25, 2014 at 4:19 pm #325088$content = esc_sql($content);
worked for me! thank you, Ismael.
best
Simon
September 25, 2014 at 4:20 pm #325091Hey!
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 oneRegards,
YigitOctober 13, 2014 at 11:32 am #334792Hi, 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.atmanfred
October 13, 2014 at 11:55 am #334801OK, I uploaded functions.php through ftp, but it was a scary, strange error.
manfredOctober 13, 2014 at 11:59 pm #335262December 6, 2014 at 2:52 am #363999I’m not sure of these instructions.. Can you elaborate more please?
Thanks,
Ben
December 8, 2014 at 11:57 pm #365049Hey Ben!
Can you paste the PHP error you are getting?
Best regards,
JosueDecember 14, 2014 at 9:55 am #367935Hi 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
December 15, 2014 at 11:02 pm #368640Hi 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!
JosueDecember 16, 2014 at 2:43 am #368740Everything is fine with this regard – credentials etc…
Please give me a fix for it.
Thanks
December 16, 2014 at 2:55 am #368742It’s ok.. the
$content = esc_sql($content);Worked of me thanks!
-
AuthorPosts
- The topic ‘Problems PHP 5.5 Google Map Widget’ is closed to new replies.