Last modified: 2011-02-13 23:25:12 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 T29353, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27353 - IPv6 address not recognised
IPv6 address not recognised
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.18.x
All Linux
: Normal blocker (vote)
: ---
Assigned To: Aaron Schulz
http://ipv6.helpmebot.org.uk/w/
: ipv6
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-12 04:13 UTC by Simon Walker
Modified: 2011-02-13 23:25 UTC (History)
2 users (show)

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


Attachments

Description Simon Walker 2011-02-12 04:13:53 UTC
When attempting to access a MediaWiki installation via IPv6 (using the IP address 2001:5c0:1400:a::df), I get the following error:

Unable to determine IP

Backtrace:

#0 /var/www/helpmebot.org.uk/w/includes/User.php(1517): wfGetIP()
#1 /var/www/helpmebot.org.uk/w/includes/db/Database.php(676): User->getName()
#2 /var/www/helpmebot.org.uk/w/includes/db/Database.php(1046): DatabaseBase->query('SELECT lc_valu...', 'LCStore_DB::get')
#3 /var/www/helpmebot.org.uk/w/includes/db/Database.php(1130): DatabaseBase->select('l10n_cache', Array, Array, 'LCStore_DB::get', Array, Array)
#4 /var/www/helpmebot.org.uk/w/includes/LocalisationCache.php(764): DatabaseBase->selectRow('l10n_cache', Array, Array, 'LCStore_DB::get')
#5 /var/www/helpmebot.org.uk/w/includes/LocalisationCache.php(318): LCStore_DB->get('en', 'deps')
#6 /var/www/helpmebot.org.uk/w/includes/LocalisationCache.php(347): LocalisationCache->isExpired('en')
#7 /var/www/helpmebot.org.uk/w/includes/LocalisationCache.php(259): LocalisationCache->initLanguage('en')
#8 /var/www/helpmebot.org.uk/w/includes/LocalisationCache.php(205): LocalisationCache->loadItem('en', 'defaultUserOpti...')
#9 /var/www/helpmebot.org.uk/w/languages/Language.php(473): LocalisationCache->getItem('en', 'defaultUserOpti...')
#10 /var/www/helpmebot.org.uk/w/includes/User.php(1059): Language->getDefaultUserOptionOverrides()
#11 /var/www/helpmebot.org.uk/w/includes/User.php(1967): User::getDefaultOptions()
#12 /var/www/helpmebot.org.uk/w/includes/parser/ParserOptions.php(207): User->getOption('numberheadings')
#13 /var/www/helpmebot.org.uk/w/includes/parser/ParserOptions.php(159): ParserOptions->initialiseFromUser(Object(User))
#14 /var/www/helpmebot.org.uk/w/includes/Article.php(4403): ParserOptions->__construct(Object(User))
#15 /var/www/helpmebot.org.uk/w/includes/Article.php(839): Article->getParserOptions()
#16 /var/www/helpmebot.org.uk/w/includes/Wiki.php(477): Article->view()
#17 /var/www/helpmebot.org.uk/w/includes/Wiki.php(69): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
#18 /var/www/helpmebot.org.uk/w/index.php(104): MediaWiki->performRequestForTitle(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
#19 {main}


Adding a few echos seems to reveal that the line:
 $ip = IP::canonicalize( $_SERVER['REMOTE_ADDR'] );
returns nothing.

This is currently running r82006.
Comment 1 Bawolff (Brian Wolff) 2011-02-13 08:19:40 UTC
What webserver are you running.

This (mostly) works for me on apache. (otoh, when accessing any special page using ipv6 locally I get white screen of death, which i need to investigate futher)
Comment 2 Simon Walker 2011-02-13 18:11:25 UTC
Apache/2.2.14 (Ubuntu) - http://ipv6.helpmebot.org.uk/~stwalkerster/info.php

Might this be related to the fact IPv6 connectivity is being provided via a tunnel from Hurricane Electric?
Comment 3 Bawolff (Brian Wolff) 2011-02-13 19:42:06 UTC
> This (mostly) works for me on apache. (otoh, when accessing any special page
> using ipv6 locally I get white screen of death, which i need to investigate
> futher)
Just to clarify, I discovered my comment about special pages not working was due to the redirect bug (bug 14977). Its unrelated to your issue.
Comment 4 Brion Vibber 2011-02-13 20:55:02 UTC
Can you double-check what $_SERVER['REMOTE_ADDR'] returns? Sounds like we have a couple possibilities:

1) REMOTE_ADDR data provided by the web server is missing or bogus
2) REMOTE_ADDR is fine, but for some reason that value doesn't get normalized correctly by IP::canonicalize()
Comment 5 Simon Walker 2011-02-13 21:08:30 UTC
I created a new script in a different directory which just contained the following code:

echo ">" . $_SERVER['REMOTE_ADDR'] . "<";

The output of this is (http://ipv6.helpmebot.org.uk/~stwalkerster/remoteaddr.php):

>2001:5c0:1400:a::df<

I hope this is what you wanted.

(The > < is something I commonly use to check for leading and trailing whitespace)
Comment 6 Brion Vibber 2011-02-13 21:39:51 UTC
Regression in r77067: prior to that, IP::isValid('2001:5c0:1400:a::df') returned true.
Comment 7 Aaron Schulz 2011-02-13 23:25:12 UTC
Fixed in r82093.

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


Navigation
Links