Jump to content


Geo Tracking - Showing New York Everytime


6 replies to this topic

#1 drethan

    Member

  • Members
  • PipPip
  • 15 posts

Posted 16 August 2018 - 10:04 PM

Hi,

We have Geo Tracking enabled and the license is there for the Premium Geo Tracking Server, However, everyone in the US is coming as

Region: New York
City: New York

and anyone in the UK is showing ...

Region: London, City Of
City: London

The IP addresses are coming through correctly so I know the PHP IP Server Param is correct. Any ideas?

#2 Patrick Keil

    Administrator

  • Administrators
  • 3775 posts
  • LocationSingen, Germany

Posted 17 August 2018 - 06:53 AM

Hi,

You only see the default values which indicates that the database query failed.

Is your LiveZilla up-to-date?

Is PHP PHAR support enabled?

Cheers.

#3 drethan

    Member

  • Members
  • PipPip
  • 15 posts

Posted 21 August 2018 - 04:19 PM

Yes LiveZilla is on 7.1.0.5 and after looking at the phpinfo we have
  • Phar EXT version 2.0.2
  • Phar API version 1.1.1
  • Phar-based phar archives enabled
  • Tar-based phar archives enabled
  • ZIP-based phar archives enabled
  • gzip compression enabled
  • bzip2 compression enabled
  • Native OpenSSL support enabled



Any other ideas? Or ways I can troubleshoot the database query? I am not seeing anything in the logs.

#4 Patrick Keil

    Administrator

  • Administrators
  • 3775 posts
  • LocationSingen, Germany

Posted 22 August 2018 - 10:36 AM

Hi,

Thanks for the clarification. Unfortunately, no idea.

If you open /livezilla/geo.php in your browser, you should get the location data (base64 encoded) of your own IP.

Geo.php is very clear code, you can try to isolate the problem further.

In case you can provide FTP access please let me know and we will troubleshoot this for you.

Cheers.

#5 drethan

    Member

  • Members
  • PipPip
  • 15 posts

Posted 22 August 2018 - 09:44 PM

Thank you for the insight into geo.php ! So I was able to dig a little deeper and confirmed the issue is stemming from our live zilla installation living on a load balancer ...

Now we have set the SERVER_PARAM to "HTTP_X_CLUSTER_CLIENT_IP" which is working ( and our visitors IP addresses are showing correctly in the Operator Login Area )... BUT for some odd reason the Geo lookup is unable to read from our configuration and is defaulting to the REMOTE_ADDR ... Maybe you have some ideas why?

In _lib/objects.global.inc.php @ Communication::GetIp (Lines 1884 -1931)

The first line
$params = array(@Server::$Configuration->File["gl_sipp"]);

is always returning an array with an empty value ... When I look at the config table and look for the key "gl_sipp" I do see our value ... What gives?

#6 Patrick Keil

    Administrator

  • Administrators
  • 3775 posts
  • LocationSingen, Germany

Posted 23 August 2018 - 11:55 AM

Hi,

Thanks for your research.

For performance reasons, the geo.php runs without database connection (mysql). Since the IP configuration is stored in your mysql database it can't be read and is ignored.

You can uncomment the require lines in the geo.php file to solve the problem.

We will try to fix that for the next update, it hurts to re-enable mysql link as 99% or the configurations to require it though. Let's see ...

Thanks again.

#7 drethan

    Member

  • Members
  • PipPip
  • 15 posts

Posted 23 August 2018 - 06:33 PM

Ahh OK. I tried removing the comments for the require lines at the top

/*
require(LIVEZILLA_PATH . "_definitions/definitions.inc.php");
require(LIVEZILLA_PATH . "_lib/functions.global.inc.php");
require(LIVEZILLA_PATH . "_definitions/definitions.protocol.inc.php");
require(LIVEZILLA_PATH . "_definitions/definitions.dynamic.inc.php");
require(LIVEZILLA_PATH . "_lib/functions.external.inc.php");
*/

But it was conflicting ( functions.global.inc.php also calls the object global ) so what I did is change the default from REMOTE_ADDR to the one we needed. In _lib/objects.global.inc.php on lines 1904 ...

Maybe as alternative allow us to add overwrite configurations to the config file? Or have the geo.php be able to read from database and just cache the config ( and only bust the cahce when a config change is made )





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users