Last modified: 2014-04-30 22:22:44 UTC
Either GeoIP should be ported to HNI (or use ext_zend_compat) or maybe the newer pure PHP GeoIP2 can be used. The new version has optional C extension (PECL) however, so there would still the choice of whether to port that bit to HNI (4 methods) or not. Not sure if porting is worth it with JITed code though.
Also we should find out if anything still uses/needs this too :)
Actually it would probably make more sense to just not use this. There are 3 extensions that use getip_* methods: aaron@aaron-notebook-hdx:/var/www/CephWiki/core (master)$ grep -r geoip_ extensions/ extensions/DonationInterface/gateway_common/DonationData.php: if ( function_exists( 'geoip_country_code_by_name' ) ) { extensions/DonationInterface/gateway_common/DonationData.php: $country = @geoip_country_code_by_name( $ip ); extensions/LandingCheck/SpecialLandingCheck.php: if ( !$country && function_exists( 'geoip_country_code_by_name' ) ) { extensions/LandingCheck/SpecialLandingCheck.php: $country = geoip_country_code_by_name( $ip ); extensions/FundraiserLandingPage/FundraiserRedirector.body.php: if ( function_exists( 'geoip_country_code_by_name' ) ) { extensions/FundraiserLandingPage/FundraiserRedirector.body.php: $country = geoip_country_code_by_name( $ip ); After discussing this with Ori, we thought it best to just make a GeoIP MediaWiki extension that uses the geo location cookies set by Varnish and exposes a simple PHP class for fetching this info.
https://github.com/vipsoft/hhvm-ext-geoip