vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Digital Point User Map (https://vborg.vbsupport.ru/showthread.php?t=244236)

digitalpoint 12-15-2010 03:43 AM

Yep, looks like databases are not installed. Otherwise the "available" key would be "true".

sadaar 12-16-2010 12:14 AM

UPDATE:
I SSH'd into the server and the /var/lib/GeoIP/ directory is empty. Anything I can do? I have the GeoLiteCity.dat file.

Boofo 12-16-2010 06:56 AM

You need to change the name of GeoLiteCity.dat to GeoIPCity.dat and upload it along with GeoIP.dat to the directory on the server, if they have GeoIP installed correctly.

sadaar 12-17-2010 01:40 AM

I emailed by Host, and got this response:

Regarding GeoIP, the database had been installed at /usr/share/GeoIP, I have moved the file to /var/lib/GeoIP.

I renamed the file above and uploaded it into both locations. Still have the same issue. I can see everything buy the actual map.

Sad.. It seems like a really cool mod.

digitalpoint 12-17-2010 04:22 AM

Does the output of the previously mentioned PHP script show it as available now?

sadaar 12-17-2010 02:34 PM

Output is now as follows. I can verify that the /var/lib/GroIP/GeoIP.dat file is present, but the only other file in that directory is GeoIPCity.dat

Array ( [1] => Array ( [available] => 1 [description] => GeoIP Country Edition [filename] => /var/lib/GeoIP/GeoIP.dat ) [2] => Array ( [available] => 1 [description] => GeoIP City Edition, Rev 1 [filename] => /var/lib/GeoIP/GeoIPCity.dat ) [3] => Array ( [available] => [description] => GeoIP Region Edition, Rev 1 [filename] => /var/lib/GeoIP/GeoIPRegion.dat ) [4] => Array ( [available] => [description] => GeoIP ISP Edition [filename] => /var/lib/GeoIP/GeoIPISP.dat ) [5] => Array ( [available] => [description] => GeoIP Organization Edition [filename] => /var/lib/GeoIP/GeoIPOrg.dat ) [6] => Array ( [available] => 1 [description] => GeoIP City Edition, Rev 0 [filename] => /var/lib/GeoIP/GeoIPCity.dat ) [7] => Array ( [available] => [description] => GeoIP Region Edition, Rev 0 [filename] => /var/lib/GeoIP/GeoIPRegion.dat ) [8] => Array ( [available] => [description] => GeoIP Proxy Edition [filename] => /var/lib/GeoIP/GeoIPProxy.dat ) [9] => Array ( [available] => [description] => GeoIP ASNum Edition [filename] => /var/lib/GeoIP/GeoIPASNum.dat ) [10] => Array ( [available] => [description] => GeoIP Netspeed Edition [filename] => /var/lib/GeoIP/GeoIPNetSpeed.dat ) [11] => Array ( [available] => [description] => GeoIP Domain Name Edition [filename] => /var/lib/GeoIP/GeoIPDomain.dat ) [12] => Array ( [available] => [description] => GeoIP Country V6 Edition [filename] => /var/lib/GeoIP/GeoIPv6.dat ) )

digitalpoint 12-17-2010 07:43 PM

Looks fine from the output. Are you getting an error, or?

sadaar 12-17-2010 10:11 PM

No errors at all, just no map. I have recorded a short screencast to better illustrate my issue. I really do appreciate your help in getting this resolved.

http://screencast.com/t/I5Gv4erMXxI

digitalpoint 12-18-2010 03:11 AM

What's the URL you have it running it at? I'll check it out... maybe you are getting some sort of JS error or something with the Google Map API.

sadaar 12-18-2010 04:00 AM

Sent a PM with login credentials for you.

digitalpoint 12-18-2010 07:03 PM

Did you edit the usermap.php file by chance? It *really* looks like it's been edited to me.

sadaar 12-18-2010 10:45 PM

Hmm. No I didn't edit the file. I just re-downloaded the zip, uploaded it and overwrote what was already there, and re-imported the XML (with overwrite on), with the same results.

Mattske 12-21-2010 01:12 AM

I am getting the following errors, I confirmed with host that everything was successfully installed and renamed as per some of the comments listed above however a series of errors appears at the top of the page before the map.

No map is shown either.

Any help or assistance would be superb.

Cheers!

PHP Code:

Warninggeoip_record_by_name() [function.geoip-record-by-name]: Required database not available at /opt/geoip/share/GeoIP/GeoIPCity.datin [path]/usermap.php on line 100


Warning
Invalid argument supplied for foreach() in [path]/usermap.php on line 128

Warning
Invalid argument supplied for foreach() in [path]/usermap.php on line 133

Warning
Invalid argument supplied for foreach() in [path]/usermap.php on line 152

Warning
geoip_record_by_name() [function.geoip-record-by-name]: Required database not available at /opt/geoip/share/GeoIP/GeoIPCity.datin [path]/usermap.php on line 158 


EDIT:
This is a listing of the two directories - am I missing anything?


-
Quote:

bash-3.2# ls -aslh /var/lib/GeoIP
total 29M
2.0K drwxr-xr-x 2 root root 2.0K Dec 20 19:06 .
2.0K drwxr-xr-x 19 root root 2.0K Dec 20 18:38 ..
1.2M -rw-r--r-- 1 root root 1.2M Dec 20 19:06 GeoIP.dat
28M -rw-r--r-- 1 root root 28M Dec 20 18:38 GeoIPCity.dat



-bash-3.2# ls -aslh /usr/local/share/GeoIP/
total 57M
2.0K drwxr-xr-x 2 root root 2.0K Dec 20 18:38 .
2.0K drwxr-xr-x 6 root root 2.0K Dec 20 10:32 ..
1.2M -rw-r--r-- 1 root root 1.2M Dec 20 10:32 GeoIP.dat
28M -rw-r--r-- 1 root root 28M Dec 20 18:38 GeoIPCity.dat
28M -rw-r--r-- 1 root root 28M Dec 3 19:41 GeoLiteCity.dat

digitalpoint 12-21-2010 08:57 AM

The error shows it's looking in a different path for the database.

Mattske 12-21-2010 09:25 AM

Sorry, I am rather new at this, should I change .....

( /usr/local/share/GeoIP/ ) to match what it is looking for ( /opt/geoip/share/GeoIP/ ) ??

Would that solve my issues?

Boofo 12-21-2010 01:04 PM

Just upload the GeoIP files to the directory it shows in the error.

Mattske 12-21-2010 05:20 PM

Thanks, got it working.

Boofo 12-21-2010 07:36 PM

Glad you got it going. ;)

marcopolo 12-27-2010 06:22 PM

Ok, I've installed as part of my hosting service (from what I can see) and get this

Fatal error: Call to undefined function geoip_record_by_name() in /data03/????/public_html/usermap.php on line 100

I've checked my php folder here /php/Net/GeoIP and see these files location.php and DMA.php

Any ideas?

Bit more info after speaking to my hosting company is that they use PEAR packages and have confirmed I have install what I need to use GeoIP, these being Console_Getopt 1.3.0 and Net_Geo 1.0.5

digitalpoint 12-28-2010 03:33 PM

You would still need to install the geoip module for PHP.

marcopolo 12-28-2010 03:57 PM

This one?

http://pear.php.net/package/Net_GeoIP/download

Mattske 12-29-2010 05:44 AM

How do I get mine to display correctly by usergroup/status.

http://img27.imageshack.us/img27/115...01229at123.png

Guests don't seem to show up at all, and users outside of the 5,6,7 usergroups are showing as admins/moderators despite the option being set to 5,6,7 only....

sadaar 12-29-2010 09:58 PM

I still can't even get the map....

opaa 01-02-2011 10:12 AM

Great MOD ! I install GEOIP by CPanel (centos) and use this datafiles . It works now !!

marcopolo 01-04-2011 11:45 AM

Ok, I've been told this by my hosting service

I have raised this with our NOC team they have checked and it turns the module is trying to use mod_perl which is disabled on our servers because of the security risk it poses. That is why it was failing all along. Im afraid this will mean that it won't be possible to use this module on the cpanel, its rare that this happens but sadly the requirements can not be met to install this.

Looking around the best way to get around this would be to manually download the geoip.dat database (its in csv format) and then have your website manually look up to that (http://www.builderau.com.au/program/...9129583,00.htm). Basically it would consist of that database file and geoip.inc file that would need to be included in your php code, this then would allow you to do geoIP lookups. It can be obtained here http://www.maxmind.com/app/geolitecountry.

Is this possible?

volarium 01-20-2011 05:15 PM

My host uses the PEAR Net/GeoIP module, `require('Net/GeoIP.php');`.

Can you please advise if this will work with Digital Point or not?

jay5r 01-25-2011 08:49 PM

Like Boofo I'm getting the following error...

Warning: Invalid argument supplied for foreach() in [path]/usermap.php on line 128
Warning: Invalid argument supplied for foreach() in [path]/usermap.php on line 133
Warning: Invalid argument supplied for foreach() in [path]/usermap.php on line 152

Quote:

Originally Posted by Boofo (Post 2128307)
Figured it out. Apparently, I was not logged in when the errors were shown. Do I need to turn it off for guests then? Apparently, if there are no users and only guests on the site, is when the error occurs.

But unlike Boofo, I'm logged in and there are users on the site (73 members, 410 guests)...

Any idea what the problem is?

digitalpoint 01-25-2011 09:11 PM

What's the URL you have it installed at?

junaid 01-26-2011 04:11 AM

work fine me php 5.2.14 after upgrade php5.3.4
not work

Boofo 01-26-2011 06:22 AM

Quote:

Originally Posted by junaid (Post 2154725)
work fine me php 5.2.14 after upgrade php5.3.4
not work

It works fine for me on 5.3.4. No change after the PHP upgrade. Did you remember to re-add geoip on the upgrade?

jay5r 01-27-2011 02:06 PM

Just wanted to say thanks to Shawn. We PM'd and he suggested I didn't have the database installed correctly. I deleted the files, reinstalled and it works great now.

Quote:

Originally Posted by digitalpoint (Post 2154571)
What's the URL you have it installed at?

Quote:

Originally Posted by jay5r (Post 2154562)
Like Boofo I'm getting the following error...

Warning: Invalid argument supplied for foreach() in [path]/usermap.php on line 128
Warning: Invalid argument supplied for foreach() in [path]/usermap.php on line 133
Warning: Invalid argument supplied for foreach() in [path]/usermap.php on line 152

But unlike Boofo, I'm logged in and there are users on the site (73 members, 410 guests)...

Any idea what the problem is?



jay5r 01-28-2011 11:50 AM

I installed it and users seem to like it. How hard would it be to modify? About 70% of my users want their screen names to show when you scroll over or click on their pin. Another 13% want to be able to opt out. Ideally I'd like screen names to show by default (being able to click to their member page would be incredible) and there be the option to set a persistent cookie that could either hide the screen name or completely opt-out.

digitalpoint 01-28-2011 05:53 PM

You couldn't do the opt-out with a cookie, would need to be something stored in the database since user A viewing it would need to know the opt-out setting for user B. It wouldn't be *terribly* hard for a programmer to do for you.

RustedBucket 02-15-2011 09:37 PM

Hey Shawn, any chance of making this work using membergroups?

digitalpoint 02-16-2011 01:24 AM

what do you mean exactly?

Valerio 02-25-2011 01:40 AM

Hello
I ask to my host to install the module and it did straight away, so i proceed with the installation and the result was:

Quote:

Warning: geoip_record_by_name() [function.geoip-record-by-name]: Required database not available at /var/lib/GeoIP/GeoIPCity.dat. in [path]/usermap.php on line 100

Warning: Invalid argument supplied for foreach() in [path]/usermap.php on line 128

Warning: Invalid argument supplied for foreach() in [path]/usermap.php on line 133

Warning: Invalid argument supplied for foreach() in [path]/usermap.php on line 152

Warning: geoip_record_by_name() [function.geoip-record-by-name]: Required database not available at /var/lib/GeoIP/GeoIPCity.dat. in [path]/usermap.php on line 158
I ask to my host and he reply:

Quote:

hello,

Unfortunately the database it is requesting is not free: http://www.maxmind.com/app/products it is $370/site license.

The other issue is if you cannot specify where the database is located from within the script to reference a file from within your account files and directories rather than the backend server files and directories you will need to upgrade to a VPS or dedicated server.

Please let us know if there is anything else we can assist you with.
so?

TeknoSounds 02-25-2011 03:21 AM

Ask them to use/install the LITE version:

http://www.maxmind.com/app/geolitecity

Valerio 02-25-2011 09:31 PM

Fantastic, it work, Thank you digital point :up:

I open a ticket, and my host download the database in a folder into the root and change the path of php.

I'm very happy about that host.

The map visualize only the realtime users connected right?

Do you think it will be possible to add the nickname of the registered users to the map so when i click on a pin it appear the username of the registered user?

digitalpoint 02-25-2011 10:23 PM

No sorry... Too many privacy issues.

Boofo 02-25-2011 11:17 PM

Shaun, is there a way to suppress the foreach errors that show up if a guest clicks the link and no users are logged in?


All times are GMT. The time now is 11:59 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01833 seconds
  • Memory Usage 1,835KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete