MediaWiki internal error (Unable to determine IP)

joeyfjj45

New Member
Messages
3
Reaction score
0
Points
0
I'm getting this error in my site (http://transport.joeyfoo.x10.mx/index.php/Main_Page), it was working before this. Anyone has a solution?

Internal error
Unable to determine IP
Backtrace:
#0 /home/joeyfjj/public_html/transport/includes/User.php(1148): wfGetIP()
#1 /home/joeyfjj/public_html/transport/includes/User.php(1384): User->getBlockedStatus(false)
#2 /home/joeyfjj/public_html/transport/includes/User.php(1401): User->isBlocked(false)
#3 /home/joeyfjj/public_html/transport/includes/Title.php(1538): User->isBlockedFrom(Object(Title))
#4 /home/joeyfjj/public_html/transport/includes/Title.php(1618): Title->checkUserBlock('edit', Object(User), Array, false, true)
#5 /home/joeyfjj/public_html/transport/includes/Title.php(1171): Title->getUserPermissionsErrorsInternal('edit', Object(User), false, true)
#6 /home/joeyfjj/public_html/transport/includes/Title.php(1141): Title->userCan('edit', false)
#7 /home/joeyfjj/public_html/transport/includes/Article.php(899): Title->quickUserCan('edit')
#8 /home/joeyfjj/public_html/transport/includes/Wiki.php(462): Article->view()
#9 /home/joeyfjj/public_html/transport/includes/Wiki.php(69): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
#10 /home/joeyfjj/public_html/transport/index.php(114): MediaWiki->performRequestForTitle(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
#11 {main}
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
What's the value of $_SERVER['REMOTE_ADDR']? What version of MediaWiki are you using?
 

joeyfjj45

New Member
Messages
3
Reaction score
0
Points
0
What's the value of $_SERVER['REMOTE_ADDR']? What version of MediaWiki are you using?

MediaWiki 1.17.0. $_SERVER ['REMOTE_ADDR'] is returning me no value. I think it might be a problem on x10hosting's side.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
$_SERVER['REMOTE_ADDR'] definitely shouldn't be empty. How did you test it? Are any of:
  • $_SERVER['HTTP_X_REAL_IP']
  • $_SERVER['X_REAL_IP']
  • $_SERVER['HTTP_X_FORWARDED_FOR']
  • $_SERVER['X_FORWARDED_FOR']
  • $_ENV['REMOTE_ADDR']
  • $_ENV['HTTP_X_REAL_IP']
  • $_ENV['X_REAL_IP']
  • $_ENV['HTTP_X_FORWARDED_FOR']
  • $_ENV['X_FORWARDED_FOR']
set? If so, a workaround would be to set $_SERVER['REMOTE_ADDR'] from the other variable when $_SERVER['REMOTE_ADDR'] isn't set.
 
Last edited:

bmoore68

New Member
Messages
8
Reaction score
0
Points
0
I am having the same problem, after installing MediaWiki last week, it worked Tuesday through yesterday, until our office power went off about 3:30 PM (huge San Diego outage). Today all I get is "Internal Error" then updated LocalSettings to ShowExceptionDetails, then I get exactly what the above got. This isn't my first problem here, previous problem was "disk full" with less than 70MB active space, but promptly restored the next day.

Could yesterday's huge power outage yesterday had anything to do with it? IP servers going offline and back online??

Anyway I made a workaround so I could keep working, however this is not acceptable for people with public wiki, who won't be able to block offending IP addresses:

My workaround. I didn't actually put 1.2.3.4 there but probably would work!

Edit includes/ProxyTools.php, after line 70 "wfGetIP()"
After "static $ip ..."
{
$ip = "1.2.3.4";
return $ip;
}

I would like to delete these four lines again when the problem is fixed

---------- Post added at 09:37 PM ---------- Previous post was at 09:14 PM ----------

Looks like someone else had this same problem recently, three weeks ago on Aug 17.
http://x10hosting.com/forums/free-hosting/165341-mediawiki-unable-determine-ip.html

Does this mean it will fix itself soon?
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
Some X10 servers recently switched which web server software they were using from Apache to litespeed. With Apache, there was a reverse proxy running nginx. The word is the litespeed setup doesn't use the nginx proxy and a script required for the proxy was causing problems. Corey has disabled the script, and Joey's site no longer shows the error. The fix should do the same for any other MediaWiki-based sites on Starka.
 

bmoore68

New Member
Messages
8
Reaction score
0
Points
0
I concur. Working the way it was supposed to. Thank you for the rapid service and thorough explanation, much appreciated.
I hope the glitches will subside, my company needs a reliable host, willing to pay for it, but manager doesn't want to just "throw money" and the problems we've had in just the first week do not seem like the kind money will fix. Hopefully we won't have Disk Full, error unable to contact host, 500 Server Internal, or more php errors in the next week. Looking at Illuminated or Prime.
 
Top