Good evenig,

I install Geouser (downloaded tonight). I checked box and SAVE and I saw the below error :

Fatal error: require_once() [function.require]: Failed opening required 'GeoIP.php' (include_path='.:/opt/php/lib/php') in /home/www/XXX/drupal/modules/geouser/geouser.module on line 55

Impossible to access my website.

By ftp, I deleted the directory "geouser": now it's ok, I have access to my web site.

Driss

Comments

damien tournoud’s picture

Project: Drupal core » GeoUser
Version: 6.1 » 6.x-1.0
Component: other » Code
Category: bug » support

Requalified as a support request for the GeoUser module.

From the README.TXT of the GeoUser module, it seems that you have to download GeoLiteCity from Maxmind in order for that module to work:

Download GeoLiteCity:
from http://www.maxmind.com/app/geolitecity
unzip the package you've just downloaded

colinbrandt’s picture

It also disabled my website, except deleting the GeoUser directory did not solve my problem. I still can't access my site. The module said it did not depend on any other module, which apparently is not the case.

Bo Kleve’s picture

Take a look in the error logfile to see if that can give you a clue to why a removal of the geouser directory didn't work.

There is no mention in the Drupal-6 version about any dependency, but you need to install more.

I got Net_GeoIP from http://download.pear.php.net/package/Net_GeoIP-1.0.0RC1.tgz, and moved that to /usr/share/php (mv Net_GeoIP-1.0.0RC1 /usr/share/php/Net). The logs tell you where it the path the files are searched for.

And as noted earlier, you also need to get GeoLiteCity.dat (from http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz) and move the unziped file into the geouser directory.

I also had to edit the links to the files in the geouser.module to give the full paths:

require_once('/usr/share/drupal-6/sites/all/modules/geouser/geouser.inc');

$geo = new Net_GeoIP('/usr/share/drupal-6/sites/all/modules/geouser/GeoLiteCity.dat');

That should at least be a step to get it working.

Also, if you want to see a map of where the user is from, you need to get yourself a Yahoo application ID as is described in the settings for GeoUser.

My remaining problem now (except for trying not to have to edit the module-file), is to convert the data in the GeoLiteCity file from ISO-Latin-8 to UTF-8...

/BoK

pobster’s picture

Status: Active » Fixed

The better way to reference the files is to change these lines;

10: require_once(drupal_get_path('module', 'geouser') .'/geouser.inc');
55: require_once(drupal_get_path('module', 'geouser') .'/Net/GeoIP.php');
56: $geo = new Net_GeoIP(drupal_get_path('module', 'geouser') .'/GeoLiteCity.dat');

Note: Obviously this means the module expects to find the GeoIP.php inside a directory called 'Net' within your geouser directory.

Line 10 also shouldn't be there... But meh, this isn't my module so whatever... It should be inside a hook_init (or perhaps hook_boot I get them mixed up...)

Pobster

pobster’s picture

Status: Fixed » Needs review

Oops, marked this as fixed accidentally - should be as patch (not my module!)

Pobster

damien tournoud’s picture

Status: Needs review » Active
pobster’s picture

Why active again? It works fine after the changes?

Pobster

damien tournoud’s picture

It can't be "Patch (xxx)", because there is no patch I can see. But no big deal, I don't know that module at all (and sure hope that it is still maintained).

pobster’s picture

Status: Active » Needs review

A patch doesn't have to be a file?!?!?! The above instructions are a patch, hence why it should be a patch. Leaving the status as active suggests there's no fix... and that's just stupid... All it takes is to change a couple of lines, it's hardly rocket science.

Pobster

zidong.c’s picture

Status: Needs review » Closed (fixed)

Thank you for your attention for GeoUser module,
Please always check for the latest release.

dnice1975@msn.com’s picture

Maybe, i'm missing something, but I've installed both the module and the geolite city file, but nothing happens. I don't have access to anything beyond the generic permissions. What do I need to do?

irishgringo’s picture

well, I have been trying to get this thing to work.. and no luck.
why cant there be a detailed installation guide somewhere.. the readme file in the geouser dir sucks... too small

is this module being maintained?