Last modified: 2014-04-30 22:22:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T64990, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62990 - Investigate porting GeoIP for HHVM or using GeoIP2-php
Investigate porting GeoIP for HHVM or using GeoIP2-php
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.23.0
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: hhvm
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-23 21:41 UTC by Aaron Schulz
Modified: 2014-04-30 22:22 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Aaron Schulz 2014-03-23 21:41:56 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.
Comment 1 Aaron Schulz 2014-03-24 06:38:51 UTC
Also we should find out if anything still uses/needs this too :)
Comment 2 Aaron Schulz 2014-04-11 22:41:22 UTC
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.
Comment 3 Ori Livneh 2014-04-30 22:22:44 UTC
https://github.com/vipsoft/hhvm-ext-geoip

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links