Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Script started on Sun Sep 18 22:56:27 2011
- bash-3.2$ pwd
- /Users/tamara/Projects/ZakayGeoIP-PECL
- bash-3.2$ make clean
- find . -name \*.gcno -o -name \*.gcda | xargs rm -f
- find . -name \*.lo -o -name \*.o | xargs rm -f
- find . -name \*.la -o -name \*.a | xargs rm -f
- find . -name \*.so | xargs rm -f
- find . -name .libs -a -type d|xargs rm -rf
- rm -f libphp.la modules/* libs/*
- bash-3.2$ ./configure --prefix=/usr/local --with-php-config=/usr/local/bin/php-config --with-geoip
- 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 cc... cc
- checking for C compiler default output file name... a.out
- checking whether the C compiler works... yes
- checking whether we are cross compiling... no
- checking for suffix of executables...
- 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... i386-apple-darwin9.8.0
- checking host system type... i386-apple-darwin9.8.0
- checking target system type... i386-apple-darwin9.8.0
- checking for PHP prefix... /usr/local
- checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
- checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20090626
- checking for PHP installed headers prefix... /usr/local/include/php
- checking if debug is enabled... rm: conftest.dSYM: is a directory
- no
- checking if zts is enabled... rm: conftest.dSYM: is a directory
- 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... 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
- found in /opt/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 LGPL compatible GeoIP libs... expr: non-numeric argument
- cannot detect
- checking library features to determine version (not acurate)... found 1004005
- checking for ld used by cc... /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld
- checking if the linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) is GNU ld... no
- checking for /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld option to reload object files... -r
- checking for BSD-compatible nm... /usr/bin/nm -p
- checking whether ln -s works... yes
- checking how to recognize dependent libraries... pass_all
- checking for ANSI C header files... rm: conftest.dSYM: is a directory
- rm: conftest.dSYM: is a directory
- yes
- checking for sys/types.h... yes
- checking for sys/stat.h... yes
- checking for stdlib.h... yes
- checking for string.h... yes
- checking for memory.h... yes
- checking for strings.h... yes
- checking for inttypes.h... yes
- checking for stdint.h... yes
- checking for unistd.h... yes
- checking dlfcn.h usability... yes
- checking dlfcn.h presence... yes
- checking for dlfcn.h... yes
- checking the maximum length of command line arguments... 196608
- checking command to parse /usr/bin/nm -p output from cc object... rm: conftest.dSYM: is a directory
- 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... no
- 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 (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) supports shared libraries... yes
- checking dynamic linker characteristics... darwin9.8.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: creating ./config.status
- config.status: creating config.h
- config.status: config.h is unchanged
- bash-3.2$ make
- /bin/sh /Users/tamara/Projects/ZakayGeoIP-PECL/libtool --mode=compile cc -I. -I/Users/tamara/Projects/ZakayGeoIP-PECL -DPHP_ATOM_INC -I/Users/tamara/Projects/ZakayGeoIP-PECL/include -I/Users/tamara/Projects/ZakayGeoIP-PECL/main -I/Users/tamara/Projects/ZakayGeoIP-PECL -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /Users/tamara/Projects/ZakayGeoIP-PECL/geoip.c -o geoip.lo
- mkdir .libs
- cc -I. -I/Users/tamara/Projects/ZakayGeoIP-PECL -DPHP_ATOM_INC -I/Users/tamara/Projects/ZakayGeoIP-PECL/include -I/Users/tamara/Projects/ZakayGeoIP-PECL/main -I/Users/tamara/Projects/ZakayGeoIP-PECL -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /Users/tamara/Projects/ZakayGeoIP-PECL/geoip.c -fno-common -DPIC -o .libs/geoip.o
- /bin/sh /Users/tamara/Projects/ZakayGeoIP-PECL/libtool --mode=link cc -DPHP_ATOM_INC -I/Users/tamara/Projects/ZakayGeoIP-PECL/include -I/Users/tamara/Projects/ZakayGeoIP-PECL/main -I/Users/tamara/Projects/ZakayGeoIP-PECL -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -o geoip.la -export-dynamic -avoid-version -prefer-pic -module -rpath /Users/tamara/Projects/ZakayGeoIP-PECL/modules geoip.lo -Wl,-rpath,/opt/local/lib -L/opt/local/lib -lGeoIP
- cc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/geoip.so -bundle .libs/geoip.o -L/opt/local/lib /opt/local/lib/libGeoIP.dylib -Wl,-rpath -Wl,/opt/local/lib
- dsymutil .libs/geoip.so || :
- creating geoip.la
- (cd .libs && rm -f geoip.la && ln -s ../geoip.la geoip.la)
- /bin/sh /Users/tamara/Projects/ZakayGeoIP-PECL/libtool --mode=install cp ./geoip.la /Users/tamara/Projects/ZakayGeoIP-PECL/modules
- cp ./.libs/geoip.so /Users/tamara/Projects/ZakayGeoIP-PECL/modules/geoip.so
- cp ./.libs/geoip.lai /Users/tamara/Projects/ZakayGeoIP-PECL/modules/geoip.la
- ----------------------------------------------------------------------
- Libraries have been installed in:
- /Users/tamara/Projects/ZakayGeoIP-PECL/modules
- If you ever happen to want to link against installed libraries
- in a given directory, LIBDIR, you must either use libtool, and
- specify the full pathname of the library, or use the `-LLIBDIR'
- flag during linking and do at least one of the following:
- - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
- during execution
- See any operating system documentation about shared libraries for
- more information, such as the ld(1) and ld.so(8) manual pages.
- ----------------------------------------------------------------------
- Build complete.
- Don't forget to run 'make test'.
- bash-3.2$ sudo make install
- Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20090626/
- bash-3.2$ find /opt/local -name 'libGeoIP*'
- /opt/local/lib/libGeoIP.1.dylib
- /opt/local/lib/libGeoIP.a
- /opt/local/lib/libGeoIP.dylib
- /opt/local/lib/libGeoIP.la
- /opt/local/lib/libGeoIPUpdate.0.dylib
- /opt/local/lib/libGeoIPUpdate.a
- /opt/local/lib/libGeoIPUpdate.dylib
- /opt/local/lib/libGeoIPUpdate.la
- bash-3.2$ ls -lh /usr/local/lib/php/extensions/no-debug-non-zts-20090626/
- total 368
- -rwxr-xr-x 1 root wheel 25K Sep 18 22:57 geoip.so*
- -rwxr-xr-x 1 root wheel 113K Jul 13 16:55 iconv.a*
- -rwxr-xr-x 1 root wheel 40K Jul 13 16:55 iconv.so*
- bash-3.2$ grep '^extension=' /usr/local/etc/php.ini
- extension=iconv.so
- extension=geoip.so
- bash-3.2$ php -i | grep -E '(iconv|geoip)'
- Registered Stream Filters => zlib.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed
- iconv
- iconv support => enabled
- iconv implementation => libiconv
- iconv library version => 1.11
- iconv.input_encoding => ISO-8859-1 => ISO-8859-1
- iconv.internal_encoding => ISO-8859-1 => ISO-8859-1
- iconv.output_encoding => ISO-8859-1 => ISO-8859-1
- base-3.2$ cat ~/Sites/testgeoip.php
- <?php
- /*
- * test geoip lookup functions (From Zakay/geoip library - PECL fork)
- */
- error_reporting(E_ALL || E_STRICT);
- ini_set('display_errors','on');
- ini_set('display_startup_errors','on');
- $ipaddress='tamnet.homeip.net'; /* target for lookups */
- ?>
- <html>
- <head>
- <title>Testing geoip</title>
- </head>
- <body>
- <h1>Looking up geoip info for: <?php echo $ipaddress; ?></h1>
- <ul>
- <li>continent code: <?php echo geoip_continent_code_by_name($ipaddress); ?></li>
- <li>country code by name: <?php echo geoip_country_code_by_name($ipaddress); ?></li>
- <li>geoip_country_code3_by_name: <?php echo geoip_country_code3_by_name($ipaddress); ?> </li>
- <li>geoip_country_name_by_name: <?php echo geoip_country_name_by_name($ipaddress); ?> </li>
- <li>geoip_database_info: GEOIP_COUNTRY_EDITION <?php echo geoip_db_available(GEOIP_COUNTRY_EDITION) ? geoip_database_info(GEOIP_COUNTRY_EDITION) : "no country edition"; ?></li>
- <li>geoip_database_info: GEOIP_CITY_EDITION <?php echo geoip_db_available(GEOIP_CITY_EDITION) ? geoip_database_info(GEOIP_CITY_EDITION) : "no city edition"; ?></li>
- <li>geoip_db_get_all_info:</li>
- <pre>
- <?php var_dump(geoip_db_get_all_info()); ?>
- </pre>
- <li>geoip_id_by_name:
- <?php
- $netspeed = geoip_id_by_name($ipaddress);
- echo 'The connection type is ';
- switch ($netspeed) {
- case GEOIP_DIALUP_SPEED:
- echo 'dial-up';
- break;
- case GEOIP_CABLEDSL_SPEED:
- echo 'cable or DSL';
- break;
- case GEOIP_CORPORATE_SPEED:
- echo 'corporate';
- break;
- case GEOIP_UNKNOWN_SPEED:
- default:
- echo 'unknown';
- }
- ?>
- </li>
- <li>geoip_isp_by_name: <?php echo geoip_isp_by_name($ipaddress); ?></li>
- <li>geoip_org_by_name: <?php echo geoip_org_by_name($ipaddress); ?></li>
- <li>geoip_record_by_name:</li>
- <pre><?php var_dump(geoip_record_by_name($ipaddress)); ?></pre>
- <li>geoip_region_by_name: <?php echo geoip_region_by_name($ipaddress); ?></li>
- </ul>
- </body>
- </html>
- bash-3.2$ php ~/Sites/testgeoip.php
- <html>
- <head>
- <title>Testing geoip</title>
- </head>
- <body>
- <h1>Looking up geoip info for: tamnet.homeip.net</h1>
- <ul>
- <li>continent code:
- Fatal error: Call to undefined function geoip_continent_code_by_name() in /Users/tamara/Sites/testgeoip.php on line 22
- bash-3.2$ exit
- exit
- Script done on Sun Sep 18 23:01:01 2011
Advertisement
Add Comment
Please, Sign In to add comment