I tried install the GeoIP Geo location PECL extension on centos 6 but no luck.
#yum install geoip geoip-devel php-pear
#pecl install geoip
Added "extension=geoip.so" to the php.ini and restart apache.
Everything installed very well and when I tired to check with "php -m | grep -i geo" command I got the following error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/extensions/no-debug-non-zts-20100525/geoip.so' - /usr/lib64/extensions/no-debug-non-zts-20100525/geoip.so: cannot open shared object file: No such file or directory in Unknown on line 0
Can somebody tell me whats (why is geoip.so missing) wrong or how can I install the GeoIP Geo location PECL extension?
First of all you have to be sure that latest pear with pecl extension is installed into your server.
After that to install geoip extension properly follow the below guide :
1. First of all edit your php.ini file and remove the "extension=geoip.so" line and "extension_dir=/usr/lib64/extensions/no-debug-non-zts-20100525" lines which may have come from your previous installation.
2. Run the below commands :
yum -y install geoip-devel
cd /tmp
wget http://pecl.php.net/get/geoip-1.0.8.tgz
tar -zxvf geoip-1.0.8.tgz
cd geoip-1.0.8
/usr/local/bin/phpize
./configure --with-php-config=/usr/local/bin/php-config
make
make install
3. After "make install" command execution done you will get a line stating the shared extension directory path. For Example : some text /usr/lib64/extensions/no-debug-non-zts-20131226
4. Copy that directory path only. Then go to your php.ini file editor.
5. Go to the bottom of the file and paste : extension_dir = the path you copied from the make install completion.
6. After the extension_dir line put : extension=geoip.so
7. Restart Apache and to verify the module, use this command : php -m
Hope the tutorial helps you. Thanks...
You are SUPERSTAR! Thank you! :) Work for me...
Glad to help :)
Thank you! it works now
Please help me. I try follow all steps in this guide, but my apache was still not restart or not running :((.
I try 5 times and all result is same. My cwp is down now :(