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)

cherylferraro 06-22-2012 12:16 AM

This mod looks great, but for some reason it's not working on my setup. I'm trying to figure out what I've done wrong...

url: *

GeoIP install is verified, it's showing up in php.info. I'm not seeing any errors. The page loads but the map isn't displaying.

I've probably bungled something, but I can't figure out what... thank you in advance for pointing me in the right direction.

digitalpoint 06-22-2012 03:24 PM

Is the GeoIP database installed?

cherylferraro 06-22-2012 03:50 PM

Yes.

Does that look right?

I've disabled all other mods just to see if there was a conflict but the map still won't display...

digitalpoint 06-22-2012 05:47 PM

Yep... Looks good there. Unfortunately it's gonna have to wait until Sunday before I can really look into it (no computer until then).

cherylferraro 06-22-2012 05:51 PM

Okay, no problem. Whenever it's convenient for you. In the meantime I'll keep poking at it and if I figure it out I'll post the solution in this thread.

digitalpoint 06-25-2012 03:10 PM

Hmmm... everything looks like it's installed okay, but for whatever reason, the geoip extension on your server doesn't seem to be resolving IPs for some reason.

Can you make a simple PHP script to test the actual geoip functionality? See this post.

cherylferraro 06-25-2012 05:34 PM

I put my own ip in that php script and it comes up blank. Seems like it is the server.

That site uses Cloudflare, reverse proxy. I added mod_cloudflare to httpd.conf which enabled vbulletin to log user IPs instead of cloudflare's, but it looks like it probably doesn't work with geoip.

To see if it would happen on a site that wasn't coming through cloudflare I tried the script on another domain that is on the same server. It didn't work there either.

I've got a couple of sites where I'd really like to install the map so I'll contact cloudflare and see if they have any suggestions. If there's a solution I'll post it here. Thank you for taking a look.

togotutor 07-02-2012 04:08 PM

Reserved for later.

addamroy 07-10-2012 12:59 AM

I installed this mod on my test forum and I'm getting the following error when I navigate to the /usermap.php page...

"Fatal error: Call to undefined function geoip_record_by_name() in /home/****/public_html/testvb/usermap.php on line 100"

digitalpoint 07-10-2012 07:03 AM

It requires the geoip PHP extension...

addamroy 07-10-2012 05:38 PM

I had it enabled and I'm still recieving the same error... What do I do next?

digitalpoint 07-10-2012 05:46 PM

Well it's either not installed or not installed correctly because your PHP stack doesn't know the function. Does it show if you look at php info via a phpinfo() call?

addamroy 07-11-2012 12:01 AM

Quote:

Originally Posted by digitalpoint (Post 2346736)
Well it's either not installed or not installed correctly because your PHP stack doesn't know the function. Does it show if you look at php info via a phpinfo() call?

How do I do a phpinfo() call?

cjwinternet 07-11-2012 05:58 AM

I've got about 300 of these at the top of usermap.php...

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

TeknoSounds 07-11-2012 07:54 AM

Quote:

Originally Posted by addamroy (Post 2346839)
How do I do a phpinfo() call?

if you don't know how to create a php file to do this, you can find out in your AdminCP, at the bottom on the left under Maintenance, click View PHP Info then search for geoip

TeknoSounds 07-11-2012 07:54 AM

Quote:

Originally Posted by cjwinternet (Post 2346883)
I've got about 300 of these at the top of usermap.php...

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

It can't find the .dat file for GeoIP.

ywwz 07-11-2012 01:35 PM

I tried, but I am too far from that extension.

Poppet 07-11-2012 11:29 PM

I've got the same problem as Cheryl, mod loads ok, but no map displayed. My hosts installed the GeoIP plugin for me and I've checked the phpinfo and it is installed.

www.trotonline.co.uk/forum/usermap.php

digitalpoint 07-12-2012 04:44 PM

Make a script on your server with just this:

PHP Code:

<?php 
print_r 
(geoip_record_by_name($_SERVER['REMOTE_ADDR']));

What does it output?

Poppet 07-12-2012 06:14 PM

I created a file called ip.php but the code in, uploaded it to the server went to the page and it's blank.

digitalpoint 07-12-2012 06:55 PM

Is your server suppressing errors by chance?

Try making it this:

PHP Code:

<?php 
error_reporting
(E_ALL);
print_r (geoip_record_by_name($_SERVER['REMOTE_ADDR']));


Poppet 07-12-2012 07:09 PM

Tried that and still a blank page, cleared the cache in my browser just to be sure.

digitalpoint 07-12-2012 07:35 PM

Well something is wrong with your server... you are probably going to want to talk to your server admin to figure it out. geoip_record_by_name() is returning nothing for you (not even an error) on your server.

Poppet 07-13-2012 09:37 AM

My hosts have fixed the problem and it's working great now. They are going to let me know what the problem was and if it's a PHP config issue it might help out other people...

Poppet 07-13-2012 10:18 AM

It was the database location, it needs to be at,

/usr/local/share/GeoIP

addamroy 07-14-2012 01:04 AM

Quote:

Originally Posted by digitalpoint (Post 2347340)
Make a script on your server with just this:

PHP Code:

<?php 
print_r 
(geoip_record_by_name($_SERVER['REMOTE_ADDR']));

What does it output?

Fatal error: Call to undefined function geoip_record_by_name() in /home/*****/public_html/test-geoip.php on line 2

Also, don't forget those closing ?> tags in your php code up there lol

digitalpoint 07-14-2012 04:12 PM

Quote:

Originally Posted by addamroy (Post 2347837)
Fatal error: Call to undefined function geoip_record_by_name() in /home/*****/public_html/test-geoip.php on line 2

Also, don't forget those closing ?> tags in your php code up there lol

That error means you don't have the GeoIP extension installed in your version of PHP.

?> was intentionally left out (it's not required).

imported_stefan 07-23-2012 12:53 PM

Quote:

Originally Posted by Poppet (Post 2347532)
It was the database location, it needs to be at,

/usr/local/share/GeoIP

I have maybe the same here. How can I switch the db location and where. I looked at this directory and its empty.

digitalpoint 07-23-2012 03:42 PM

The only way to change the db location would be to recompile geoip from scratch.

imported_stefan 07-23-2012 06:35 PM

Thanks for the quick response. I thought different. Is the db located somewhere by default in a different place and can I copy it to this place?

nhawk 07-23-2012 06:53 PM

Quote:

Originally Posted by imported_stefan (Post 2350832)
Thanks for the quick response. I thought different. Is the db located somewhere by default in a different place and can I copy it to this place?

Depending on the version of Linux you're running and whether or not it was installed using an RPM for that package or some other source, it could also be in usr/share/GeoIP.

But, digitalpoint is correct about having to re-compile it if you move the database.

digitalpoint 07-23-2012 07:03 PM

The DB is not located *anywhere* by default... you need to install it (it comes from maxmind.com).

On a side note, you *can* change the default directory location I found out with a php.ini setting:
Code:

[geoip]
geoip.custom_directory=/yourdirectory/


imported_stefan 07-24-2012 08:23 AM

So I first installed on my server:

Geoip

apt-get isntall php5-geoip libapache2-mod-geoip
/etc/init.d/apache2 restart


Than I installed your addon


Now I have also install on my server the database?
Both? Only one of them? Which one? :-)

GeoLite Country GeoLite City

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

using this Install:

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

Sorry for the questions :-)

digitalpoint 07-24-2012 04:46 PM

I'm not sure, I've never tried to install just one... I've always installed both.

svyrydov 07-24-2012 06:49 PM

Good day,
I asked my admin to enable GeoIP PHP extension
they told me, that is activated now.
But still getting:
Quote:

Fatal error: Call to undefined function geoip_record_by_name() in /home/procrew/public_html/test.php on line 2
HERE IS LINK http://procrewing.com/test.php

Any suggestions?
Thanks.

digitalpoint 07-24-2012 07:57 PM

I would suggest going back to your admin because it's not activated. :)

imported_stefan 07-25-2012 10:25 AM

- so databes both installed
- geoip with phphinfo checked
- mod installed

empty pages :-)

any more hints ???

error reporting on does not show up errors

goc-forum.de 07-25-2012 10:26 AM

I am getting this error code:

Warnung: geoip_record_by_name(): Required database not available at /usr/share/GeoIP/GeoIPCity.dat. in [path]/usermap.php (Zeile 100)

I uploaded your test.php and this is the result:

Array ( [1] => Array ( [available] => 1 [description] => GeoIP Country Edition [filename] => /usr/share/GeoIP/GeoIP.dat ) [2] => Array ( [available] => [description] => GeoIP City Edition, Rev 1 [filename] => /usr/share/GeoIP/GeoIPCity.dat ) [3] => Array ( [available] => [description] => GeoIP Region Edition, Rev 1 [filename] => /usr/share/GeoIP/GeoIPRegion.dat ) [4] => Array ( [available] => [description] => GeoIP ISP Edition [filename] => /usr/share/GeoIP/GeoIPISP.dat ) [5] => Array ( [available] => [description] => GeoIP Organization Edition [filename] => /usr/share/GeoIP/GeoIPOrg.dat ) [6] => Array ( [available] => [description] => GeoIP City Edition, Rev 0 [filename] => /usr/share/GeoIP/GeoIPCity.dat ) [7] => Array ( [available] => [description] => GeoIP Region Edition, Rev 0 [filename] => /usr/share/GeoIP/GeoIPRegion.dat ) [8] => Array ( [available] => [description] => GeoIP Proxy Edition [filename] => /usr/share/GeoIP/GeoIPProxy.dat ) [9] => Array ( [available] => [description] => GeoIP ASNum Edition [filename] => /usr/share/GeoIP/GeoIPASNum.dat ) [10] => Array ( [available] => [description] => GeoIP Netspeed Edition [filename] => /usr/share/GeoIP/GeoIPNetSpeed.dat ) [11] => Array ( [available] => [description] => GeoIP Domain Name Edition [filename] => /usr/share/GeoIP/GeoIPDomain.dat ) [12] => Array ( [available] => 1 [description] => GeoIP Country V6 Edition [filename] => /usr/share/GeoIP/GeoIPv6.dat ) [13] => Array ( [available] => [description] => GeoIP LocationID ASCII Edition [filename] => /usr/share/GeoIP/GeoIPLocA.dat ) [14] => Array ( [available] => [description] => GeoIP Accuracy Radius Edition [filename] => /usr/share/GeoIP/GeoIPDistance.dat ) [15] => Array ( [available] => [description] => GeoIP City with Confidence Edition [filename] => /usr/share/GeoIP/GeoIPCityConfidence.dat ) [16] => Array ( [available] => [description] => GeoIP City with Confidence and Accuracy Edition [filename] => /usr/share/GeoIP/GeoIPCityConfidenceDist.dat ) )

Whats wrong? I am using a "managed" root server! So i can`t do anything myself so the support must do it if its a server side problem....

svyrydov 07-25-2012 11:07 AM

Mine is working now. Problem was with admins :)
procrewing.com/usermap.php
all you need is to ask your hosting to enable GeoIP

digitalpoint 07-25-2012 04:39 PM

Quote:

Originally Posted by imported_stefan (Post 2351274)
- so databes both installed
- geoip with phphinfo checked
- mod installed


empty pages :-)

any more hints ???

error reporting on does not show up errors

Nope, you will need to talk to your server admins really...

Quote:

Originally Posted by goc-forum.de (Post 2351275)
I am getting this error code:

Warnung: geoip_record_by_name(): Required database not available at /usr/share/GeoIP/GeoIPCity.dat. in [path]/usermap.php (Zeile 100)

I uploaded your test.php and this is the result:

Array ( [1] => Array ( [available] => 1 [description] => GeoIP Country Edition [filename] => /usr/share/GeoIP/GeoIP.dat ) [2] => Array ( [available] => [description] => GeoIP City Edition, Rev 1 [filename] => /usr/share/GeoIP/GeoIPCity.dat ) [3] => Array ( [available] => [description] => GeoIP Region Edition, Rev 1 [filename] => /usr/share/GeoIP/GeoIPRegion.dat ) [4] => Array ( [available] => [description] => GeoIP ISP Edition [filename] => /usr/share/GeoIP/GeoIPISP.dat ) [5] => Array ( [available] => [description] => GeoIP Organization Edition [filename] => /usr/share/GeoIP/GeoIPOrg.dat ) [6] => Array ( [available] => [description] => GeoIP City Edition, Rev 0 [filename] => /usr/share/GeoIP/GeoIPCity.dat ) [7] => Array ( [available] => [description] => GeoIP Region Edition, Rev 0 [filename] => /usr/share/GeoIP/GeoIPRegion.dat ) [8] => Array ( [available] => [description] => GeoIP Proxy Edition [filename] => /usr/share/GeoIP/GeoIPProxy.dat ) [9] => Array ( [available] => [description] => GeoIP ASNum Edition [filename] => /usr/share/GeoIP/GeoIPASNum.dat ) [10] => Array ( [available] => [description] => GeoIP Netspeed Edition [filename] => /usr/share/GeoIP/GeoIPNetSpeed.dat ) [11] => Array ( [available] => [description] => GeoIP Domain Name Edition [filename] => /usr/share/GeoIP/GeoIPDomain.dat ) [12] => Array ( [available] => 1 [description] => GeoIP Country V6 Edition [filename] => /usr/share/GeoIP/GeoIPv6.dat ) [13] => Array ( [available] => [description] => GeoIP LocationID ASCII Edition [filename] => /usr/share/GeoIP/GeoIPLocA.dat ) [14] => Array ( [available] => [description] => GeoIP Accuracy Radius Edition [filename] => /usr/share/GeoIP/GeoIPDistance.dat ) [15] => Array ( [available] => [description] => GeoIP City with Confidence Edition [filename] => /usr/share/GeoIP/GeoIPCityConfidence.dat ) [16] => Array ( [available] => [description] => GeoIP City with Confidence and Accuracy Edition [filename] => /usr/share/GeoIP/GeoIPCityConfidenceDist.dat ) )


Whats wrong? I am using a "managed" root server! So i can`t do anything myself so the support must do it if its a server side problem....

I'd say this is a pretty good indicator of what's wrong... :)

Quote:

Required database not available at /usr/share/GeoIP/GeoIPCity.dat


All times are GMT. The time now is 04:07 AM.

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.01772 seconds
  • Memory Usage 1,837KB
  • 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_code_printable
  • (3)bbcode_php_printable
  • (11)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