Title: PHP warning
Last modified: December 9, 2021

---

# PHP warning

 *  Resolved [ArtGoddess](https://wordpress.org/support/users/artgoddess/)
 * (@artgoddess)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-warning-326/)
 * Hello [@benjamin4](https://wordpress.org/support/users/benjamin4/),
 * After activating Maxmind in plugin, this PHP warning can be read:
 *     ```
       Notice: fread(): Read of 8192 bytes failed with errno=21 Is a directory in /home/user/domain.com/wp-content/plugins/geoip-detect/vendor/maxmind-db/reader/src/MaxMind/Db/Reader.php on line 276
       ```
   
 * Thank you.

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

 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-warning-326/#post-15148819)
 * This is a weird notice that I haven’t seen before, let me know if you have any
   idea how I could reproduce it … he seems to try to open a file that is actually
   a directory, but why?
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-warning-326/#post-15148821)
 * Is the Maxmind automatic update source working for you?
 *  Thread Starter [ArtGoddess](https://wordpress.org/support/users/artgoddess/)
 * (@artgoddess)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-warning-326/#post-15148830)
 * My setup is WordPress 5.8.2 and PHP 8.
 * After installation, I changed the setting to Maxmind. When I saved it, this PHP
   warning appeared on the screen several times, and I had to close down the browser.
 * I deleted the plugin directly from FTP.
 * I have reinstalled again, and this behaviour appears again, making my site unresponsive.
 * I’m sorry, really. Please, let me know how I can help. Many thanks.
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-warning-326/#post-15150378)
 * Hi, I have made a change, can you please try the newest beta ?
    [https://github.com/yellowtree/geoip-detect/wiki/Beta-Testing](https://github.com/yellowtree/geoip-detect/wiki/Beta-Testing)
 * Did I get it right that the notice appeared after you saved the Maxmind API key?
 *  Thread Starter [ArtGoddess](https://wordpress.org/support/users/artgoddess/)
 * (@artgoddess)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-warning-326/#post-15150474)
 * Hello [@benjamin4](https://wordpress.org/support/users/benjamin4/),
 * Yes, the problem arose once I selected the Maxmind option and saved it. Not before.
 * I am following the instructions on the page you have provided, but I am not able
   to locate this:
 * `Go to Settings > Github Updater and activate Enable Branch Switching`
 * [⌊Screenshot-2021-12-10-at-11-19-05⌉⌊Screenshot-2021-12-10-at-11-19-05⌉[
 * [⌊Screenshot-2021-12-10-at-11-20-53⌉⌊Screenshot-2021-12-10-at-11-20-53⌉[
 * Sorry, this is the first time I am doing this. How can I go ahead?
 *  Thread Starter [ArtGoddess](https://wordpress.org/support/users/artgoddess/)
 * (@artgoddess)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-warning-326/#post-15150518)
 * If I use the alternative method, and I upload the beta plugin to my server, [Transmit app](https://www.panic.com/transmit/)
   shows me this warning:
 * [⌊Screenshot-2021-12-10-at-11-28-53⌉⌊Screenshot-2021-12-10-at-11-28-53⌉[
 * In case I haven’t said so, my setup is:
    PHP 8 in apache server WordPress 5.8.2
 * I’m afraid I don’t have enough knowledge or experience to help you troubleshoot
   this. Feel free to suggest anything I can do to help. Sorry for the trouble.
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/php-warning-326/#post-15153830)
 * Oh, the Github Updater plugin changed – I will need to remove that method then.
   
   The second method should work fine, just click on “continue” …
 *  Thread Starter [ArtGoddess](https://wordpress.org/support/users/artgoddess/)
 * (@artgoddess)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/php-warning-326/#post-15154069)
 * Ok, I have used the second method.
 * I’m afraid that I don’t have good news. Right now, it happens the same.
 * It seems that my site remembers my last choice and, once the plugin is activated,
   PHP warnings are generated and my site hangs up.
 * The only way to solve this is to delete the folder.
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/php-warning-326/#post-15159005)
 * Yes wordpress saves the plugin options even when you disable the plugin. You 
   can change the data source manually by entering the url <your-server.com>/wp-
   admin/options.php and setting `geoip-detect-source` to `hostinfo`.
 * Can you try again with Beta5, please? Also, please let me know if you see any
   additional error message (as I have added a few error conditions).
 * [https://github.com/yellowtree/geoip-detect/archive/beta.zip](https://github.com/yellowtree/geoip-detect/archive/beta.zip)
 *  Thread Starter [ArtGoddess](https://wordpress.org/support/users/artgoddess/)
 * (@artgoddess)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/php-warning-326/#post-15159214)
 * [@benjamin4](https://wordpress.org/support/users/benjamin4/) thank you for your
   answer.
 * In `/wp-admin/options.php`, `geoip-detect-source` was set to `manual`. I’ve changed
   it to `hostinfo`, as suggested.
 * Uploaded file via FTP.
    Plugin activated. I have checked maxmind, ipstack and
   cloudflare with my own accounts.
 * As far as I can see, ti works like a charm. Congratulations! And thank you very
   much for your time. 🙂
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/php-warning-326/#post-15160924)
 * Ok great! Thanks for your patience!

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

The topic ‘PHP warning’ is closed to new replies.

 * ![](https://ps.w.org/geoip-detect/assets/icon-256x256.jpg?rev=978998)
 * [Geolocation IP Detection](https://wordpress.org/plugins/geoip-detect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/geoip-detect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/geoip-detect/)
 * [Active Topics](https://wordpress.org/support/plugin/geoip-detect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/geoip-detect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/geoip-detect/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/php-warning-326/#post-15160924)
 * Status: resolved