I need setup geoip extension on php 7.1

93 views
Skip to first unread message

Vu Nguyen Anh

unread,
Mar 28, 2020, 10:32:45 AM3/28/20
to OpenLiteSpeed Development
Who is help me? I try, try, trying but not success now :(

qtwrk

unread,
Mar 28, 2020, 11:08:26 AM3/28/20
to OpenLiteSpeed Development
please try 

/usr/local/lsws/lsphp71/bin/pecl install http://pecl.php.net/get/geoip-1.1.1.tgz
echo
"extension=geoip.so"  > /usr/local/lsws/lsphp71/etc/php.d/20-geoip.ini
pkill lsphp


Vu Nguyen Anh

unread,
Mar 28, 2020, 12:08:17 PM3/28/20
to OpenLiteSpeed Development
Thank for your help. Can you explain your mean by command(I use centos 7).
Thanks.

qtwrk

unread,
Mar 28, 2020, 12:10:12 PM3/28/20
to OpenLiteSpeed Development
first line to use  pecl to download geoip1.1.1 and compile it

second line add the .so file into .ini to load it

thrid line to kill lsphp process to restart it , in order to load new .so file.


Vu Nguyen Anh

unread,
Mar 28, 2020, 12:21:21 PM3/28/20
to OpenLiteSpeed Development
Sorry for the inconvenience, but I have trouble when running the first command line.
This is the error:

checking for PHP includes... -I/usr/local/lsws/lsphp71/include/php -I/usr/local/lsws/lsphp71/include/php/main -I/usr/local/lsws/lsphp71/include/php/TSRM -I/usr/local/lsws/lsphp71/include/php/Zend -I/usr/local/lsws/lsphp71/include/php/ext -I/usr/local/lsws/lsphp71/include/php/ext/date/lib

checking for PHP extension directory... /usr/local/lsws/lsphp71/lib64/php/modules

checking for PHP installed headers prefix... /usr/local/lsws/lsphp71/include/php

checking if debug is enabled... no

checking if zts is enabled... no

checking for re2c... no

configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.

checking for gawk... gawk

checking for geoip support... yes, shared

checking for geoip files in default path... not found

configure: error: Please reinstall the geoip distribution

ERROR: `/var/tmp/geoip/configure --with-php-config=/usr/local/lsws/lsphp71/bin/php-config' failed


Please help me to fix this :(

qtwrk

unread,
Mar 28, 2020, 12:23:30 PM3/28/20
to OpenLiteSpeed Development
try 

yum install geoip
yum install geoip-devel

then recompile it again.

Vu Nguyen Anh

unread,
Mar 28, 2020, 12:44:38 PM3/28/20
to OpenLiteSpeed Development
Thank you so much. geoip is running in my openlitespeed.
Reply all
Reply to author
Forward
0 new messages