Title: PHP Fatal error:  Uncaught exception &#039;InvalidArgumentException&#039;
Last modified: August 31, 2016

---

# PHP Fatal error: Uncaught exception 'InvalidArgumentException'

 *  [the_specialist2005](https://wordpress.org/support/users/the_specialist2005/)
 * (@the_specialist2005)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-exception-invalidargumentexception/)
 * [08-Mar-2016 03:32:17 UTC] PHP Fatal error: Uncaught exception ‘InvalidArgumentException’
   with message ‘The value “1.0.0.196,41.196.197.115” is not a valid IP address.’
   in /wp-content/plugins/geoip-detect/vendor/maxmind-db/reader/src/MaxMind/Db/Reader.
   php:100
    Stack trace: #0 /wp-content/plugins/geoip-detect/vendor/geoip2/geoip2/
   src/Database/Reader.php(203): MaxMind\Db\Reader->get(‘1.0.0.196,41.19…’) #1 /
   wp-content/plugins/geoip-detect/vendor/geoip2/geoip2/src/Database/Reader.php(
   176): GeoIp2\Database\Reader->getRecord(‘Country’, ‘Country’, ‘1.0.0.196,41.19…’)#
   2 /wp-content/plugins/geoip-detect/vendor/geoip2/geoip2/src/Database/Reader.php(
   87): GeoIp2\Database\Reader->modelFor(‘Country’, ‘Country’, ‘1.0.0.196,41.19…’)#
   3 /wp-content/plugins/geoip-detect/geoip-detect-lib.php(144): GeoIp2\Database\
   Reader->country(‘1.0.0.196,41.19…’) #4 /wp-content/plugins/geoip-detect/api.php(
   50): _geoip_detect in /wp-content/plugins/geoip-detect/vendor/maxmind-db/reader/
   src/MaxMind/Db/Reader.php on line 100 ……………… I use this function to get the IP
   $record = geoip_detect2_get_info_from_ip( $_SERVER[‘REMOTE_ADDR’], NULL); it 
   seems that it sends two ip addresses in each request
 * [https://wordpress.org/plugins/geoip-detect/](https://wordpress.org/plugins/geoip-detect/)

Viewing 1 replies (of 1 total)

 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-exception-invalidargumentexception/#post-7149076)
 * You should use `geoip_detect2_get_info_from_current_ip()` instead so that you
   can enable reverse proxy options, for example.
 * However for this current example it will probably still not work. I have searched
   accross the internet why REMOTE_ADDR would give multiple IPs but I’ve only seen
   it for HTTP_X_FORWARDED_FOR. Can you tell me which Web Server are you using, 
   is it apache? Which of the 2 IP adresses is the right one?
 * Also, normally this function shouldn’t throw any exception. Can you post the 
   full stacktrace and tell me the version of the plugin you use?

Viewing 1 replies (of 1 total)

The topic ‘PHP Fatal error: Uncaught exception 'InvalidArgumentException'’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-exception-invalidargumentexception/#post-7149076)
 * Status: not resolved