Search

I am trying to work with the Geo Location Service Plugin written by Joseph Denne. (http://getsymphony.com/download/extensions/view/31849/)

I am having some difficulty in getting it to function.

Since I dont have a public IP on my development machine (although I am behind a NAT with a public IP) It tries to Geo Locate 127.0.0.1, obviously this wont work.

So I mocked up a quick test and if my IP is 127.0.0.1 I hard code my NAT Public IP. This works on my laptop in a simple php page.

<?php

if(isnull($ip)) { if ($SERVER['REMOTEADDR'] == '127.0.0.1') { $ip = "75.149.56.29"; } else { $ip = $SERVER['REMOTE_ADDR']; } }

echo "IP: ".$ip;

?>

So I went into extension.driver.php and made the change in lookup() from:

if(isnull($ip)) $ip = $SERVER['REMOTE_ADDR'];

to

if(isnull($ip)) { if ($SERVER['REMOTEADDR'] == '127.0.0.1') { $ip = "75.149.56.29"; } else { $ip = $SERVER['REMOTE_ADDR']; } }

and I still get just

1044317423

when I debug=xml

What else am I missing?

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details