• I keep getting the following messages:

    mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'www-data'@'localhost' (using password: NO)....

    and
    mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in...

    as well as
    mysqli_set_charset() expects parameter 1 to be mysqli, resource given in...

    Can anybody help me? I´m really lost.

    https://ww.wp.xz.cn/plugins/contact-form-7-to-database-extension/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    I am getting the same error messages on update of WordPress to version 3.9.
    But its not visible on WordPress version 3.8.3 and below

    This thread says mysql_real_escape_string() calls need to be replaced with esc_sql() in WordPress 3.9.

    Sadly, that means changes to the plugin code. I can’t see an obvious place to raise a ticket.

    I replaced the calls in ExportBase.php, and the plugin seems to work, though I still get the mysqli_set_charset() expects parameter 1 to be mysqli error.

    For what it’s worth, after looking at the wpdb code, I added

    define(‘WP_USE_EXT_MYSQL’, true);

    to my wp-config.php, and it fixed both errors (without needing to change ExportBase.php). Unfortunately I can’t find any documentation on that setting, so use it at your own risk.

    Plugin Author Michael Simpson

    (@msimpson)

    Version 2.7.3 now has a change that I hope resolves this issue.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘error messages: mysql_real_escape_string()’ is closed to new replies.