Hi @duisterdenhaag,
This error should only be possible to occur while the plugin is updating. Are you still seeing those currently or was it only for a while?
I’d also recommend you log errors instead of outputting them though I understand that outputting errors is sometimes necessary during development.
After 10 minuted they were still there, so I downgraded to the previous version.
I can confirm that the new version does indeed includes some issues and even fatal errors.
Some of my development sites die with this:
Fatal error: Uncaught RuntimeException: The gmp or bcmath extension must be installed to read this database. in /www/data/public_html/wp-content/plugins/wordfence/vendor/maxmind-db/reader/src/MaxMind/Db/Reader/Decoder.php:259
Stack trace:
#0 /www/data/public_html/wp-content/plugins/wordfence/vendor/maxmind-db/reader/src/MaxMind/Db/Reader/Decoder.php(129): MaxMind\Db\Reader\Decoder->decodeBigUint(‘[j)\x82’, 4)
#1 /www/data/public_html/wp-content/plugins/wordfence/vendor/maxmind-db/reader/src/MaxMind/Db/Reader/Decoder.php(93): MaxMind\Db\Reader\Decoder->decodeByType(‘uint64’, 3465515, 4)
#2 /www/data/public_html/wp-content/plugins/wordfence/vendor/maxmind-db/reader/src/MaxMind/Db/Reader/Decoder.php(193): MaxMind\Db\Reader\Decoder->decode(3465515)
#3 /www/data/public_html/wp-content/plugins/wordfence/vendor/maxmind-db/reader/src/MaxMind/Db/Reader/Decoder.php(100): MaxMind\Db\Reader\Decoder->decodeMap(9, 3465513)
#4 /www/data/public_html/wp-content/plugins/wordfence/vendor/maxmind-db/reader/src/MaxMind in /www/data/public_html/wp-content/plugins/wordfence/vendor/maxmind-db/reader/src/MaxMind/Db/Reader/Decoder.php on line 259
I never had this error before. Just appeared in this update.
Also, it appears sometimes. Even on sites that did had this update a few hours already.
I can also confirm that the update took our site down. I didn’t get as far as looking at the error logs but visitors were greeted with a 500 error. Deleting the plugin resolved the site issue.
Any tips on downgrading the plugin? Never done that before.
I am having the same issue with my sites.
PHP Notice: Undefined offset: 173 in public_html/wp-content/plugins/wordfence/vendor/maxmind-db/reader/src/MaxMind/Db/Reader/Decoder.php on line 87
Also when I go to the settings page essentially all resources get a 404 error.
And reinstalling using wp-cli didn’t help
Downgrading worked to get the site back online.
wp plugin install wordfence --version=7.1.11 --force
Hi everyone,
We’re looking in to this and a fix that covers at least some of you should be coming out with our next release.
@kadaicross,
Your errors seem to be related to missing PHP extensions. You’ll need to check with your host there to see if they can help you enable either the gmp or bcmath extension for PHP. If you have an old PHP version, upgrading PHP might help.
@stevec114,
If you can share the specific error message you got (it would be available in your PHP error logs) that would help to figure out what happened in your case.
@tvanderpool,
What you pasted is a PHP Notice (not an error) which should not be causing your site to go down, unless possible you have your site set to print out PHP errors in the code as they happen. If you do, I recommend you set PHP to only log errors instead of print them out. You can use WP_DEBUG for this.