note 87647 added to geoip.setup

From: Date: Sun, 14 Dec 2008 18:16:45 +0000
Subject: note 87647 added to geoip.setup
Groups: php.notes 
Request: Send a blank email to php-notes+get-148160@lists.php.net to get a copy of this message
Installation on OSX (Leopard) running MAMP First you need MacPorts installed and operational: http://www.macports.org Use that to install libgeoip. From a terminal window, do: $ sudo port install libgeoip This installs the library in /opt/local. Unfortunately the current version of the PECL extension doesn't know to look there, so you'll need to download and compile manually from http://pecl.php.net/package/geoip Assuming it's in your download directory, extract it: $ cd ~/Downloads $ tar -xzf geoip-1.0.3.tgz $ cd geoip-1.0.3 Now edit the config.m4 file and change the SEARCH_PATH variable, as described in the following bug report: http://pecl.php.net/bugs/bug.php?id=14795 Now you should be able to compile and install the extension as usual. Make sure you use the phpize from the MAMP package, not the one that ships with OSX: $ /App*/MAMP/bin/php5/bin/phpize $ ./configure $ make $ sudo make install If phpize complains that it cannot find files under /Applications/MAMP/bin/php5/include, make sure you have the development version of MAMP installed (link towards the bottom of the MAMP download page). You're nearly there! The extension will have installed in /usr/lib/php. You need to copy it into your MAMP extension directory: $ cd /App*/MAMP/bin/php5/lib/php/ext*/no-debug*/ $ mv /usr/lib/php/ext*/no-debug*/geoip.so . Now edit the php.ini file in /Applications/MAMP/conf/php5/ and add the following line: extension=geoip.so Restart your web server and check phpinfo() - the geoip extension should now be listed. Good luck! ---- Server IP: 69.147.83.197 Probable Submitter: 86.164.91.49 ---- Manual Page -- http://www.php.net/manual/en/geoip.setup.php Edit -- https://master.php.net/note/edit/87647 Del: integrated -- https://master.php.net/note/delete/87647/integrated Del: useless -- https://master.php.net/note/delete/87647/useless Del: bad code -- https://master.php.net/note/delete/87647/bad+code Del: spam -- https://master.php.net/note/delete/87647/spam Del: non-english -- https://master.php.net/note/delete/87647/non-english Del: in docs -- https://master.php.net/note/delete/87647/in+docs Del: other reasons-- https://master.php.net/note/delete/87647 Reject -- https://master.php.net/note/reject/87647 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#148160) next »