rlerdorf / geoip Goto Github PK
View Code? Open in Web Editor NEWPHP geoip ext for PHP 8
License: Other
PHP geoip ext for PHP 8
License: Other
Hopefully this isn't an unreasonable ask, but would it be possible to push tag 1.3.0 to PECL? http://pecl.php.net/package/geoip
It's still easier to install via pecl
or pickle
, it would simplify installation slightly.
(Yes, I know, we should switch to the new GeoIP2, but that's a WIP ๐ฌ)
For now, I'm doing this in our Dockerfile:
...
docker-php-source extract; \
curl -L -o /tmp/geoip.tgz https://github.com/rlerdorf/geoip/archive/refs/tags/1.3.0.tar.gz; \
mkdir geoip; \
tar xfz /tmp/geoip.tgz -C geoip --strip-components 1; \
rm -r /tmp/geoip.tgz; \
mv geoip /usr/src/php/ext/geoip; \
docker-php-ext-install -j$(nproc) geoip \
docker-php-source delete
i had some issues with php8 brew install [email protected] dit not work out of the box so i did the following
brew edit [email protected]
changed from
url "https://www.php.net/distributions/php-8.0.3.tar.xz"
sha256 "c9816aa9745a9695672951eaff3a35ca5eddcb9cacf87a4f04b9fb1169010251"
changed to
url "https://www.php.net/distributions/php-8.1.3.tar.gz"
sha256 "92d74f5a4af7de90cef6cda65bd0c341dc9a1027b32f70e7b8861f6f68a38bb2"
rerun brew install [email protected] --build-from-source
followed by valet use 8.0
then i noticed some warnings
Warning: file_get_contents(/usr/local/etc/valet-php/8.0/php-fpm.d/www.conf): failed to open stream: No such file or directory in /Users/alainseys/.composer/vendor/weprovide/valet-plus/cli/Valet/Filesystem.php on line 112
PHP Warning: file_put_contents(/usr/local/etc/valet-php/8.0/php-fpm.d/www.conf): failed to open stream: No such file or directory in /Users/alainseys/.composer/vendor/weprovide/valet-plus/cli/Valet/Filesystem.php on line 125
Warning: file_put_contents(/usr/local/etc/valet-php/8.0/php-fpm.d/www.conf): failed to open stream: No such file or directory in /Users/alainseys/.composer/vendor/weprovide/valet-plus/cli/Valet/Filesystem.php on line 125```
and the error output
```In Pecl.php line 167:
Could not find installation path for: geoip
downloading geoip-1.1.1.tgz ...
Starting to download geoip-1.1.1.tgz (13,004 bytes)
.....done: 13,004 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version: 20210902
Zend Module Api No: 20210902
Zend Extension Api No: 420210902
configure.ac:18: warning: $as_echo is obsolete; use AS_ECHO(["message"]) instead
build/php.m4:2111: PHP_CONFIG_NICE is expanded from...
configure.ac:18: the top level
configure.ac:161: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:161: You should run autoupdate.
./lib/autoconf/c.m4:72: AC_LANG_C is expanded from...
build/libtool.m4:2739: _LT_AC_LANG_C_CONFIG is expanded from...
build/libtool.m4:2738: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure.ac:161: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:161: You should run autoupdate.
./lib/autoconf/c.m4:72: AC_LANG_C is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
build/libtool.m4:561: _LT_AC_LOCK is expanded from...
build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
build/libtool.m4:2739: _LT_AC_LANG_C_CONFIG is expanded from...
build/libtool.m4:2738: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure.ac:161: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:161: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
build/libtool.m4:561: _LT_AC_LOCK is expanded from...
build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
build/libtool.m4:2739: _LT_AC_LANG_C_CONFIG is expanded from...
build/libtool.m4:2738: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c
-o', so \`make -j' may be unsafe
build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
build/libtool.m4:2739: _LT_AC_LANG_C_CONFIG is expanded from...
build/libtool.m4:2738: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' m
ay be unsafe
build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
build/libtool.m4:2739: _LT_AC_LANG_C_CONFIG is expanded from...
build/libtool.m4:2738: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does n
ot exist
build/libtool.m4:1929: _LT_AC_TAGCONFIG is expanded from...
build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: output file \`$ofile' does not exist
build/libtool.m4:1929: _LT_AC_TAGCONFIG is expanded from...
build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does n
ot look like a libtool script
build/libtool.m4:1929: _LT_AC_TAGCONFIG is expanded from...
build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: output file \`$ofile' does not look like a libtoo
l script
build/libtool.m4:1929: _LT_AC_TAGCONFIG is expanded from...
build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: using \`LTCC=$LTCC', extract
ed from \`$ofile'
build/libtool.m4:1929: _LT_AC_TAGCONFIG is expanded from...
build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'
build/libtool.m4:1929: _LT_AC_TAGCONFIG is expanded from...
build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure.ac:161: warning: back quotes and double quotes must not be escaped in: tag name \"$tagname\" already exists
build/libtool.m4:1929: _LT_AC_TAGCONFIG is expanded from...
build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure.ac:161: warning: The macro `AC_LANG_CPLUSPLUS' is obsolete.
configure.ac:161: You should run autoupdate.
./lib/autoconf/c.m4:262: AC_LANG_CPLUSPLUS is expanded from...
build/libtool.m4:2821: _LT_AC_LANG_CXX_CONFIG is expanded from...
build/libtool.m4:2820: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
build/libtool.m4:1929: _LT_AC_TAGCONFIG is expanded from...
build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c
-o', so \`make -j' may be unsafe
build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
build/libtool.m4:2821: _LT_AC_LANG_CXX_CONFIG is expanded from...
build/libtool.m4:2820: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
build/libtool.m4:1929: _LT_AC_TAGCONFIG is expanded from...
build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure.ac:161: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' m
ay be unsafe
build/libtool.m4:1185: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
build/libtool.m4:2821: _LT_AC_LANG_CXX_CONFIG is expanded from...
build/libtool.m4:2820: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
build/libtool.m4:1929: _LT_AC_TAGCONFIG is expanded from...
build/libtool.m4:70: AC_LIBTOOL_SETUP is expanded from...
build/libtool.m4:52: _AC_PROG_LIBTOOL is expanded from...
build/libtool.m4:39: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
building in /private/tmp/pear/temp/pear-build-rootyddroN/geoip-1.1.1
running: /private/tmp/pear/temp/geoip/configure --with-php-config=/usr/local/opt/[email protected]/bin/php-config
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
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 the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin21.4.0
checking host system type... x86_64-apple-darwin21.4.0
checking target system type... x86_64-apple-darwin21.4.0
checking for PHP prefix... /usr/local/Cellar/[email protected]/8.1.3
checking for PHP includes... -I/usr/local/Cellar/[email protected]/8.1.3/include/php -I/usr/local/Cellar/[email protected]/8.1.3/include/php/main -I/usr/lo
cal/Cellar/[email protected]/8.1.3/include/php/TSRM -I/usr/local/Cellar/[email protected]/8.1.3/include/php/Zend -I/usr/local/Cellar/[email protected]/8.1.3/in
clude/php/ext -I/usr/local/Cellar/[email protected]/8.1.3/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/Cellar/[email protected]/8.1.3/pecl/20210902
checking for PHP installed headers prefix... /usr/local/Cellar/[email protected]/8.1.3/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for geoip support... yes, shared
checking for geoip files in default path... found in /usr/local
checking for GeoIP_open in -lGeoIP... yes
checking for GeoIP_setup_custom_directory in -lGeoIP... yes
checking for GeoIP_set_charset in -lGeoIP... yes
checking for GeoIP_continent_by_id in -lGeoIP... yes
checking for GeoIP_addr_to_num in -lGeoIP... yes
checking for cc options needed to detect all undeclared functions... none needed
checking whether GEOIP_NETSPEED_EDITION_REV1 is declared... yes
checking whether GEOIP_ACCURACYRADIUS_EDITION is declared... yes
checking for LGPL compatible GeoIP libs... expr: not a decimal number: 'dummy'
cannot detect
checking library features to determine version (not acurate)... found 1005000
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by cc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 786432
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared librarie
s... yes
checking dynamic linker characteristics... darwin21.4.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/temp/pear-build-rootyddroN/geoip-1.1.1/libtool --mode=compile cc -I. -I/private/tmp/pear/temp/geoip -I/private/tmp/pear/t
emp/pear-build-rootyddroN/geoip-1.1.1/include -I/private/tmp/pear/temp/pear-build-rootyddroN/geoip-1.1.1/main -I/private/tmp/pear/temp/geoip -I/usr
/local/Cellar/[email protected]/8.1.3/include/php -I/usr/local/Cellar/[email protected]/8.1.3/include/php/main -I/usr/local/Cellar/[email protected]/8.1.3/incl
ude/php/TSRM -I/usr/local/Cellar/[email protected]/8.1.3/include/php/Zend -I/usr/local/Cellar/[email protected]/8.1.3/include/php/ext -I/usr/local/Cellar/v
[email protected]/8.1.3/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -DZEND_COMPILE_DL_EXT=1 -c /private/tmp/pear/temp/geoi
p/geoip.c -o geoip.lo -MMD -MF geoip.dep -MT geoip.lo
mkdir .libs
cc -I. -I/private/tmp/pear/temp/geoip -I/private/tmp/pear/temp/pear-build-rootyddroN/geoip-1.1.1/include -I/private/tmp/pear/temp/pear-build-rooty
ddroN/geoip-1.1.1/main -I/private/tmp/pear/temp/geoip -I/usr/local/Cellar/[email protected]/8.1.3/include/php -I/usr/local/Cellar/[email protected]/8.1.3/i
nclude/php/main -I/usr/local/Cellar/[email protected]/8.1.3/include/php/TSRM -I/usr/local/Cellar/[email protected]/8.1.3/include/php/Zend -I/usr/local/Cell
ar/[email protected]/8.1.3/include/php/ext -I/usr/local/Cellar/[email protected]/8.1.3/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2
-DZEND_COMPILE_DL_EXT=1 -c /private/tmp/pear/temp/geoip/geoip.c -MMD -MF geoip.dep -MT geoip.lo -fno-common -DPIC -o .libs/geoip.o
/private/tmp/pear/temp/geoip/geoip.c:141:75: error: expected ')'
return OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
^
/private/tmp/pear/temp/geoip/geoip.c:141:23: note: to match this '('
return OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
^
/private/tmp/pear/temp/geoip/geoip.c:264:44: error: expected ')'
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &edition) == FAILURE) {
^
/private/tmp/pear/temp/geoip/geoip.c:264:27: note: to match this '('
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &edition) == FAILURE) {
^
/private/tmp/pear/temp/geoip/geoip.c:270:25: error: expected ')'
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Database type given is out of bound.");
^
/private/tmp/pear/temp/geoip/geoip.c:270:19: note: to match this '('
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Database type given is out of bound.");
^
/private/tmp/pear/temp/geoip/geoip.c:283:44: error: expected ')'
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &edition) == FAILURE) {
^
/private/tmp/pear/temp/geoip/geoip.c:283:27: note: to match this '('
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &edition) == FAILURE) {
^
/private/tmp/pear/temp/geoip/geoip.c:289:25: error: expected ')'
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Database type given is out of bound.");
^
/private/tmp/pear/temp/geoip/geoip.c:289:19: note: to match this '('
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Database type given is out of bound.");
^
/private/tmp/pear/temp/geoip/geoip.c:354:44: error: expected ')'
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &edition) == FAILURE) {
^
/private/tmp/pear/temp/geoip/geoip.c:354:27: note: to match this '('
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &edition) == FAILURE) {
^
/private/tmp/pear/temp/geoip/geoip.c:360:25: error: expected ')'
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Database type given is out of bound.");
^
/private/tmp/pear/temp/geoip/geoip.c:360:19: note: to match this '('
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Database type given is out of bound.");
^
/private/tmp/pear/temp/geoip/geoip.c:368:26: error: expected ')'
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Required database not available at %s.", GeoIPDBFileName[GEOIP_COUNTRY_EDITION
]);
^
/private/tmp/pear/temp/geoip/geoip.c:368:20: note: to match this '('
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Required database not available at %s.", GeoIPDBFileName[GEOIP_COUNTRY_EDITION
]);
^
/private/tmp/pear/temp/geoip/geoip.c:370:26: error: expected ')'
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Required database not available.");
^
/private/tmp/pear/temp/geoip/geoip.c:370:20: note: to match this '('
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Required database not available.");
^
In file included from /private/tmp/pear/temp/geoip/geoip.c:444:
/private/tmp/pear/temp/geoip/geoip.def:20:1: error: expected ')'
GEOIPDEF(geoip_country_code_by_name, GeoIP_country_code_by_name, GEOIP_COUNTRY_EDITION)
^
/private/tmp/pear/temp/geoip/geoip.c:396:45: note: expanded from macro 'GEOIPDEF'
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) { \
^
/private/tmp/pear/temp/geoip/geoip.def:20:1: note: to match this '('
/private/tmp/pear/temp/geoip/geoip.c:396:28: note: expanded from macro 'GEOIPDEF'
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) { \
^
In file included from /private/tmp/pear/temp/geoip/geoip.c:444:
/private/tmp/pear/temp/geoip/geoip.def:20:1: error: expected ')'
GEOIPDEF(geoip_country_code_by_name, GeoIP_country_code_by_name, GEOIP_COUNTRY_EDITION)
^
/private/tmp/pear/temp/geoip/geoip.c:403:26: note: expanded from macro 'GEOIPDEF'
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Required database not available at %s.", GeoIPDBFileName[db_type]); \
^
/private/tmp/pear/temp/geoip/geoip.def:20:1: note: to match this '('
/private/tmp/pear/temp/geoip/geoip.c:403:20: note: expanded from macro 'GEOIPDEF'
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Required database not available at %s.", GeoIPDBFileName[db_type]); \
^
In file included from /private/tmp/pear/temp/geoip/geoip.c:444:
/private/tmp/pear/temp/geoip/geoip.def:21:1: error: expected ')'
GEOIPDEF(geoip_country_code3_by_name, GeoIP_country_code3_by_name, GEOIP_COUNTRY_EDITION)
^
/private/tmp/pear/temp/geoip/geoip.c:396:45: note: expanded from macro 'GEOIPDEF'
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) { \
^
/private/tmp/pear/temp/geoip/geoip.def:21:1: note: to match this '('
/private/tmp/pear/temp/geoip/geoip.c:396:28: note: expanded from macro 'GEOIPDEF'
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) { \
^
In file included from /private/tmp/pear/temp/geoip/geoip.c:444:
/private/tmp/pear/temp/geoip/geoip.def:21:1: error: expected ')'
GEOIPDEF(geoip_country_code3_by_name, GeoIP_country_code3_by_name, GEOIP_COUNTRY_EDITION)
^
/private/tmp/pear/temp/geoip/geoip.c:403:26: note: expanded from macro 'GEOIPDEF'
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Required database not available at %s.", GeoIPDBFileName[db_type]); \
^
/private/tmp/pear/temp/geoip/geoip.def:21:1: note: to match this '('
/private/tmp/pear/temp/geoip/geoip.c:403:20: note: expanded from macro 'GEOIPDEF'
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Required database not available at %s.", GeoIPDBFileName[db_type]); \
^
In file included from /private/tmp/pear/temp/geoip/geoip.c:444:
/private/tmp/pear/temp/geoip/geoip.def:22:1: error: expected ')'
GEOIPDEF(geoip_country_name_by_name, GeoIP_country_name_by_name, GEOIP_COUNTRY_EDITION)
^
/private/tmp/pear/temp/geoip/geoip.c:396:45: note: expanded from macro 'GEOIPDEF'
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) { \
^
/private/tmp/pear/temp/geoip/geoip.def:22:1: note: to match this '('
/private/tmp/pear/temp/geoip/geoip.c:396:28: note: expanded from macro 'GEOIPDEF'
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) { \
^
In file included from /private/tmp/pear/temp/geoip/geoip.c:444:
/private/tmp/pear/temp/geoip/geoip.def:22:1: error: expected ')'
GEOIPDEF(geoip_country_name_by_name, GeoIP_country_name_by_name, GEOIP_COUNTRY_EDITION)
^
/private/tmp/pear/temp/geoip/geoip.c:403:26: note: expanded from macro 'GEOIPDEF'
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Required database not available at %s.", GeoIPDBFileName[db_type]); \
^
/private/tmp/pear/temp/geoip/geoip.def:22:1: note: to match this '('
/private/tmp/pear/temp/geoip/geoip.c:403:20: note: expanded from macro 'GEOIPDEF'
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Required database not available at %s.", GeoIPDBFileName[db_type]); \
^
In file included from /private/tmp/pear/temp/geoip/geoip.c:444:
/private/tmp/pear/temp/geoip/geoip.def:25:1: error: expected ')'
GEOIPDEF(geoip_country_code_by_name_v6, GeoIP_country_code_by_name_v6, GEOIP_COUNTRY_EDITION_V6)
^
/private/tmp/pear/temp/geoip/geoip.c:396:45: note: expanded from macro 'GEOIPDEF'
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) { \
^
/private/tmp/pear/temp/geoip/geoip.def:25:1: note: to match this '('
/private/tmp/pear/temp/geoip/geoip.c:396:28: note: expanded from macro 'GEOIPDEF'
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) { \
^
In file included from /private/tmp/pear/temp/geoip/geoip.c:444:
/private/tmp/pear/temp/geoip/geoip.def:25:1: error: expected ')'
GEOIPDEF(geoip_country_code_by_name_v6, GeoIP_country_code_by_name_v6, GEOIP_COUNTRY_EDITION_V6)
^
/private/tmp/pear/temp/geoip/geoip.c:403:26: note: expanded from macro 'GEOIPDEF'
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Required database not available at %s.", GeoIPDBFileName[db_type]); \
^
/private/tmp/pear/temp/geoip/geoip.def:25:1: note: to match this '('
/private/tmp/pear/temp/geoip/geoip.c:403:20: note: expanded from macro 'GEOIPDEF'
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Required database not available at %s.", GeoIPDBFileName[db_type]); \
^
In file included from /private/tmp/pear/temp/geoip/geoip.c:444:
/private/tmp/pear/temp/geoip/geoip.def:26:1: error: expected ')'
GEOIPDEF(geoip_country_code3_by_name_v6, GeoIP_country_code3_by_name_v6, GEOIP_COUNTRY_EDITION_V6)
^
/private/tmp/pear/temp/geoip/geoip.c:396:45: note: expanded from macro 'GEOIPDEF'
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) { \
^
/private/tmp/pear/temp/geoip/geoip.def:26:1: note: to match this '('
/private/tmp/pear/temp/geoip/geoip.c:396:28: note: expanded from macro 'GEOIPDEF'
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &arglen) == FAILURE) { \
^
In file included from /private/tmp/pear/temp/geoip/geoip.c:444:
/private/tmp/pear/temp/geoip/geoip.def:26:1: error: expected ')'
GEOIPDEF(geoip_country_code3_by_name_v6, GeoIP_country_code3_by_name_v6, GEOIP_COUNTRY_EDITION_V6)
^
/private/tmp/pear/temp/geoip/geoip.c:403:26: note: expanded from macro 'GEOIPDEF'
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Required database not available at %s.", GeoIPDBFileName[db_type]); \
^
/private/tmp/pear/temp/geoip/geoip.def:26:1: note: to match this '('
/private/tmp/pear/temp/geoip/geoip.c:403:20: note: expanded from macro 'GEOIPDEF'
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Required database not available at %s.", GeoIPDBFileName[db_type]); \
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [geoip.lo] Error 1
ERROR: `make' failed
i noticed no geopip in /usr/local/opt so i made a symbolic link but still a no go any sugestions ?
This issue i have with all the php 8x versions
Do you have any guide on how to install this and use it with the roundcube-geolocation plugin? Thank you very much
I got errors while trying to install and I'm not sure what to do. I have Ubuntu 20.04 and php 8.1:
`$/usr/bin/phpize8.0
Configuring for:
PHP Api Version: 20200930
Zend Module Api No: 20200930
Zend Extension Api No: 420200930
$ ./configure
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
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 for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20210902 -I/usr/include/php/20210902/main -I/usr/include/php/20210902/TSRM -I/usr/include/php/20210902/Zend -I/usr/include/php/20210902/ext -I/usr/include/php/20210902/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20210902
checking for PHP installed headers prefix... /usr/include/php/20210902
checking if debug is enabled... no
checking if zts is enabled... no
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`
How do I "reinstall the geoip distribution"? I ran:
$ sudo apt-cache search geoip
and there was no package called "geoip", but there were a lot of others that contained "geoip" in the title.
Here's what I currently have that contains "geoip":
`$ sudo apt list --installed | grep geoip
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
geoip-database/focal,focal,now 20191224-2 all [installed,automatic]
libgeoip1/focal,now 1.6.12-6build1 amd64 [installed,automatic]
libnginx-mod-http-geoip/focal,now 1.23.0-1+ubuntu20.04.1+deb.sury.org+1 amd64 [installed,automatic]
libnginx-mod-stream-geoip/focal,now 1.23.0-1+ubuntu20.04.1+deb.sury.org+1 amd64 [installed,automatic]
php-geoip/focal,now 1.1.1+repack1-1+ubuntu20.04.1+deb.sury.org+3 amd64 [installed]
php7.3-geoip/focal,now 1.1.1+repack1-1+ubuntu20.04.1+deb.sury.org+3 amd64 [installed]
php7.4-geoip/focal,now 1.1.1+repack1-1+ubuntu20.04.1+deb.sury.org+3 amd64 [installed,automatic]`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.