note 103708 added to geoip.setup
| From: | ben at SPAMLESS dot ism dot net dot nz | Date: | Fri, 29 Apr 2011 04:20:24 +0000 |
| Subject: | note 103708 added to geoip.setup | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-179258@lists.php.net to get a copy of this message | ||
SUSE (as root):
# zypper install php5-devel
# SuSEconfig
# mkdir -p /usr/share/GeoIP
# wget http://pecl.php.net/get/geoip-1.0.7.tgz
(whatever the latest version is from http://pecl.php.net/package/geoip )
# tar -xzf geoip-1.0.7.tgz
# cd geoip-1.0.7/
# phpize
# ./configure
# make
# make install
# cp /etc/php5/conf.d/gd.ini /etc/php5/conf.d/geoip.ini
# vi /etc/php5/conf.d/geoip.ini
Change gd.so to geoip.so
:wq!
# vi /etc/php5/apache2/php.ini
Find the [gd] section and add a new section afterwards:
[geoip]
geoip.custom_directory = /usr/share/GeoIP/
:wq!
# /etc/init.d/apache2 restart
Check phpinfo() that geoip is loaded and the default location for the DB's is set.
If you want the free DBs that are update roughly monthly, follow the "Lite" links from http://www.maxmind.com/app/country and download the
tar.gz to /usr/share/GeoIP/ and extract.
----
Server IP: 69.147.83.197
Probable Submitter: 131.203.137.7
----
Manual Page -- http://www.php.net/manual/en/geoip.setup.php
Edit -- https://master.php.net/note/edit/103708
Del: integrated -- https://master.php.net/note/delete/103708/integrated
Del: useless -- https://master.php.net/note/delete/103708/useless
Del: bad code -- https://master.php.net/note/delete/103708/bad+code
Del: spam -- https://master.php.net/note/delete/103708/spam
Del: non-english -- https://master.php.net/note/delete/103708/non-english
Del: in docs -- https://master.php.net/note/delete/103708/in+docs
Del: other reasons-- https://master.php.net/note/delete/103708
Reject -- https://master.php.net/note/reject/103708
Search -- https://master.php.net/manage/user-notes.php