Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Jaber Al Nahian

    (@rijans)

    After I put the file from https://download.ip2location.com/lite/, it doesn’t support. It says not supported.

    Plugin Author tokkonopapa

    (@tokkonopapa)

    Hi @rijans,

    Your first issue that you could not download the IP2Location Lite databases at your first installation was probably due to the network condition or server’s state.

    You can use “Download now” button at “Download database” in “Local database settings” section.

    Local database settings

    I don’t know your environment, but you seemed to login into your server from a LAN OR your server itself would be placed behind the proxy server because your IP address was in the private network which is not supported in all of the local DBs, not only IP2Location but also Maxmind/Geolite2.

    Private network

    I think when your server itself is placed behind the proxy, this plugin will automatically get the public IP address (i.e. not private) from certain PHP environment valuable if my implementation is right.

    When you are within a LAN or your server is local host, it’s quite normal.

    Once I close this topic, but please feel free to ask anything about your concerns with your environment information as much as possible.

    • This reply was modified 6 years, 6 months ago by tokkonopapa.
    Thread Starter Jaber Al Nahian

    (@rijans)

    Tried that download many times. Please note that my WordPress site is running on docker. And the ip ur plugin showing is different than my PC’s public ip address. shouldn’t the be same?

    Plugin Author tokkonopapa

    (@tokkonopapa)

    Please note that my WordPress site is running on docker.

    That’s why your PC’s IP address was shown as private. I don’t know much about Docker, but please refer the following info:

    This issue seems to depend on your docker’s configuration. But for example, when the client IP address is passed to your server on docker (apache?, nginx?, I don’t know!) through x-forwarded-for in http header, this plugin will automatically get the client IP address from HTTP_X_FORWARDED_FOR.

    This plugin can also handle HTTP_CF_CONNECTING_IP, HTTP_X_REAL_IP, HTTP_CLIENT_IP, HTTP_X_FORWARDED if the client IP address $_SERVER['REMOTE_ADDR'] is private under some environment such as proxy, reverse proxy or load balancer.

    So I guess your host OS does not pass the client IP address through one of the above http headers.

    If you know other method how to obtain the client IP address, you can also use ip-geo-block-ip-addr filter hook to replace the IP.

    • This reply was modified 6 years, 6 months ago by tokkonopapa.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘P2Location.class.php Unable to Open File’ is closed to new replies.