• Resolved Albert

    (@planetshaker)


    When Mobile Sharebar ist activated and an author tries to save or publish a post, this error message stops him from it:

    Warning: mysql_real_escape_string(): Access denied for user ”@’localhost’ (using password: NO) in /wp-content/plugins/mobile-sharebar/sharebar.php on line 82

    We have this plugin installed on 12 Website, all on different servers – problem occurs on at least 5 of them.

    Could it be a problem with PHP 5.5?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author somutech

    (@somutech)

    yes. that seems to be a problem with php-settings.
    Check, if “error reporting” is enabled and disable it in php.ini or php settings.

    Thread Starter Albert

    (@planetshaker)

    Hi, thanks, but this happened never before with no other plugins! Can you say why this is caused by mobile sharebar? Is there a way to solve this without touching the PHP settings?

    Plugin Author somutech

    (@somutech)

    Is this only on authors or also if an admin tries to save a post?

    Thread Starter Albert

    (@planetshaker)

    No, it’s also on admins and also on pages.
    Can you help? We have this now on at least 7 sites!

    Plugin Author somutech

    (@somutech)

    We think that causes in your server-settings / webspace-settings.
    The error-message is a php-error, with no detailed information.
    In our “line 82” (or near) is no issue for that.
    please contact your hoster. thank you and sorry.

    Thread Starter Albert

    (@planetshaker)

    I think we located the error: The plugin is not compatible with PHP 5.5 as far as the hoster and I could say. It’s compatible with 5.4, but not in CGI Mode (All websites that were on PHP 5.5 showed this error, the others didn’t). I switched off all Error Messages via .htaccess:

    php_flag display_errors off

    I think it’s in your interest to make it compatible, though.

    Thanks!

    Plugin Author somutech

    (@somutech)

    We will check it.
    Thank you Al Bee

    Thanks for the solution Al Bee. Works great on my blogs.

    Hi Guys,

    By disabling the flags you only hide the problem, real solution is to modify the share.php file inside plugins folder in line 82 and replace mysql_scape_real_string with esc_qsl</>.

    Final line should look like this:
    $new_meta_value = ( isset( $_POST['mobile-sharebar-meta'] ) ? esc_sql($_POST['mobile-sharebar-meta']) : '' );

    That way there are no warnings.

    Regards.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Warning: mysql_real_escape_string(): Access denied for user ''@'localhost' ….’ is closed to new replies.