• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

I can not install php module geoip

python

Regular Pleskian
Hello I am new to the forum and I think if not here in a few places I can help.
I want to install geoip PECL extension php but I can not, use php7, centos7 and plesk 12.5, follow these steps:

#yum search php plesk-devel
# Yum install make plesk- php70-devel gcc glibc-devel libgeoip-devel zlib-devel
(Here and gave me an error is this: No libgeoip-devel package available.)
the other steps that would give me aware of the mistake still do so:
# /opt/plesk/php/7.0/bin/pecl Install geoip
(Here another mistake that was obvious, you can not load the library)
# Echo "extension = geoip.so"> /opt/plesk/php/7.0/etc/php.d/geoip.ini
# Plesk bin php_handler --reread

the problem I have it on the second point:
# Yum install make plesk- php70-devel gcc glibc-devel libgeoip-devel zlib-devel

you can give me the steps to activate this module in centos plesk Use 7
 
BTW, I'm not sure that current version of geoip supports php7 - https://pecl.php.net/package/geoip
I have successfully compiled it for php5.6 with

# /opt/plesk/php/5.6/bin/pecl install geoip

But I see a lot of errors after 'make' command for php7.
There is some kind of fork with php7 support, but I have not tested it - https://github.com/Zakay/geoip
You can try to install it, at least.
 
thank you very much, now when I make the third step this:
# /opt/plesk/php/7.0/bin/pecl Install GeoIP (try also with geoip)
I get this error:
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/plesk/php/7.0/lib64/php/modules/geoip.so' - /opt/plesk/php/7.0/lib64/php/modules/geoip.so : can not open shared object file: No such file or directory in Unknown on line 0
 
as would have to install this extension? I do not wanna make more mistakes
 
Last edited:
I have successfully installed fork https://github.com/Zakay/geoip with PHP7 support.

1. Just upload zip file from mentioned site to your server.
2. Unpack it with

# unzip geoip-master.zip

3. Go to directory

# cd geoip-master/

4. Run phpize

# /opt/plesk/php/7.0/bin/phpize

5. Run configure

# ./configure --with-php-config=/opt/plesk/php/7.0/bin/php-config

6. Run make

# make

7. Run make install

# make install

8. Add extension to ini file:

# echo "extension = geoip.so"> /opt/plesk/php/7.0/etc/php.d/geoip.ini

9. Reread php_handlers:

# plesk bin php_handler --reread

Thank's all! Enjoy :)
 
great!! thank you very much takes two days with this, really thank you for helping greetings.
 
I have successfully installed fork https://github.com/Zakay/geoip with PHP7 support.

1. Just upload zip file from mentioned site to your server.
2. Unpack it with

# unzip geoip-master.zip

3. Go to directory

# cd geoip-master/

4. Run phpize

# /opt/plesk/php/7.0/bin/phpize

5. Run configure

# ./configure --with-php-config=/opt/plesk/php/7.0/bin/php-config

6. Run make

# make

7. Run make install

# make install

8. Add extension to ini file:

# echo "extension = geoip.so"> /opt/plesk/php/7.0/etc/php.d/geoip.ini

9. Reread php_handlers:

# plesk bin php_handler --reread

Thank's all! Enjoy :)

Error for NO .4

-bash: /opt/plesk/php/7.0/bin/phpize: No such file or directory
 

Code:
root@server4:~# apt install plesk-php70-devel gcc glibc-devel liboauth-devel zlib-devel
Reading package lists... Done
Building dependency tree
Reading state information... Done
N: Ignoring file 'plesk.list.ai_back' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
E: Unable to locate package plesk-php70-devel
E: Unable to locate package glibc-devel
E: Unable to locate package liboauth-devel
E: Unable to locate package zlib-devel
 
Use:

# apt-get install plesk-php70-dev build-essential

Code:
root@server4:~/geoip-master# ./configure --with-php-config=/opt/plesk/php/7.0/bin/php-con                                                                               fig
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /opt/plesk/php/7.0
checking for PHP includes... -I/opt/plesk/php/7.0/include/php -I/opt/plesk/php/7.0/include/php/main -I/opt/plesk/php/7.0/include/php/TSRM -I/opt/plesk/php/7.0/include/php/Zend -I                                                                               /opt/plesk/php/7.0/include/php/ext -I/opt/plesk/php/7.0/include/php/ext/date/lib
checking for PHP extension directory... /opt/plesk/php/7.0/lib/php/modules
checking for PHP installed headers prefix... /opt/plesk/php/7.0/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
 
Thanks... i have installed it, now am finding it hard making it possible for Piwik to recognize it
 
Back
Top