Support » Plugins and Hacks » Antispam Bee » PHP Warnings in Error Log

Viewing 6 replies - 1 through 6 (of 6 total)
  • FYI,

    I’m using PHP 5.3.27.

    Rich

    Did you modify any of the regex patterns on line 1399 of antispam_bee.php? Then ‘$regexp’ could have an invalid value.
    Or it could be that a spam bot put invalid stuff into the comment field and then ‘$comment[$field]’ contains garbage.

    I don’t see how that could enter “invalid UTF-8 strings” however..

    I have not modified any patterns.

    I believe it is spam bots posting garbage comments.

    I’ve done research and it looks like the solution is to remove or replace invalid UTF-8 characters in the data before processing.

    I’m not sure if you see this as a WP responsibility or antispam-bee’s.

    Here is a discussion that has tons of links in regards to this.

    http://stackoverflow.com/questions/1401317/remove-non-utf8-characters-from-string

    All I know is my error log is full of these, as my sites gets thousands of spam messages a day.

    Thanks,
    Rich

    Hi,

    Was this fixed in the latest release? I saw a comment in the change log that seemed related?

    If it was fixed, thanks for the update. Much appreciated.

    Rich

    I think this was added in the new version:

    /* Ignore non utf-8 chars */
    $comment[$field] = ( function_exists(‘iconv’) ? iconv(‘utf-8’, ‘utf-8//TRANSLIT’, $comment[$field]) : $comment[$field] );

    Thanks,
    Rich

    FYI,

    I’m still seeing the warning in my error_log with the latest version, but much, much, much less than before.

    [16-Dec-2013 17:59:24 UTC] PHP Warning: preg_match() [function.preg-match]: Compilation failed: invalid UTF-8 string at offset 1 in …./wp-content/plugins/antispam-bee/antispam_bee.php on line 1466

    Thanks,
    Rich

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP Warnings in Error Log’ is closed to new replies.