WordPress.org

Ready to get started?Download WordPress

Forums

PHP error in version 3.9.1 (5 posts)

  1. veg-o-matic
    Member
    Posted 2 months ago #

    I started getting this error back in version 3.7.X and despite a couple of upgrades, it won't go away.
    Oddly, it only occurs with two of our 15 blogs, all running on the same machine, all with the same version of WP

    [Wed Jun 04 08:17:15 2014] [error] [client 10.1.7.30] PHP Warning: json_encode(): Invalid UTF-8 sequence in argument in /srv/www/ht
    docs/path/to/blog/wp-includes/update.php on line 270

    Anyone got any ideas? TIA!

  2. esmi
    Forum Moderator
    Posted 2 months ago #

    Have you tried:

    - deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the default theme to rule out any theme-specific problems.

    - resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    - re-uploading all files & folders - except the wp-content folder and wp-config.php & root .htaccess files - from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.

  3. lorro
    Member
    Posted 2 months ago #

    Check for non-UTF8 characters in your post text. Candidates include smart/curling inverted commas (replace with the vertical type), the slanted apostrophe (replace with the vertical one) and the longer hyphen favoured by MS Word (replace with the minus sign which is only fractionally shorter).

    Sometimes if you put /feed at the end of the page url, the feed will break giving an error message with the exact point of the invalid character.

  4. veg-o-matic
    Member
    Posted 2 months ago #

    esmi: I have done everything you suggested and I still get the error.

    lorro: the problem doesn't seem to be in a post, but in update.php.

    Still very confused...

  5. lorro
    Member
    Posted 2 months ago #

    Yes, I've had another look. Line 270 is getting an array of plugin data. The plugin data comes from each plugin's primary file which has some comments in the top 20 or so lines, giving Name, PluginURI, Version, Description, Author etc.

    So to identify which plugin it is, rename the plugins folder to say old_plugins. If this removes the error message, create a new empty folder called plugins and move the plugins back one at a time to try and identify the plugin that's causing the problem. Then examine the plugin's primary file comments lines to look for non UTF8 characters.

    Deactivating the plugins is not sufficient for this test.

Reply

You must log in to post.

About this Topic

Tags