Last modified: 2014-09-08 21:37:53 UTC
I haven't determined where the underlying issue is yet, but starting phpsh gives an internal error, "Unable to determine IP": --- <html><head><title>Internal error - devwiki</title><style>body { font-family: sans-serif; margin: 0; padding: 0.5em 2em; }</style></head><body> <p>[7b2701b4] /usr/local/lib/python2.7/dist-packages/phpsh/phpsh.php Exception from line 1123 of /vagrant/mediawiki/includes/WebRequest.php: Unable to determine IP.</p><p>Backtrace:</p><p>#0 /vagrant/mediawiki/includes/User.php(1934): WebRequest->getIP()<br /> #1 /vagrant/mediawiki/includes/db/Database.php(1024): User->getName()<br /> #2 /vagrant/mediawiki/includes/db/Database.php(1601): DatabaseBase->query(string, string)<br /> #3 [internal function]: DatabaseBase->select(string, string, array, string)<br /> #4 /vagrant/mediawiki/includes/db/LoadBalancer.php(1180): call_user_func_array(array, array)<br /> #5 /vagrant/mediawiki/includes/jobqueue/JobQueueDB.php(617): DBConnRef->__call(string, array)<br /> #6 /vagrant/mediawiki/includes/jobqueue/JobQueueDB.php(617): DBConnRef->select(string, string, array, string)<br /> #7 /vagrant/mediawiki/includes/jobqueue/JobQueue.php(666): JobQueueDB->doGetSiblingQueuesWithJobs(array)<br /> #8 /vagrant/mediawiki/includes/jobqueue/JobQueueGroup.php(284): JobQueue->getSiblingQueuesWithJobs(array)<br /> #9 /vagrant/mediawiki/includes/jobqueue/JobQueueGroup.php(265): JobQueueGroup->getQueuesWithJobs()<br /> #10 /vagrant/mediawiki/includes/Wiki.php(670): JobQueueGroup->queuesHaveJobs(integer)<br /> #11 /vagrant/mediawiki/includes/Wiki.php(463): MediaWiki->triggerJobs()<br /> #12 /vagrant/mediawiki/index.php(46): MediaWiki->run()<br /> #13 /etc/phpsh/rc.php(15): include_once(string)<br /> #14 /usr/local/lib/python2.7/dist-packages/phpsh/phpsh.php(60): require_once(string)<br /> #15 {main}</p> </body></html> --- Since it's database-related, I tried update.php, but that didn't fix it.
Any idea how to get around it?
Looks to be caused by I9541afa408d895c3fd337a883ecfe4ce0ba57090.
Hack workaround is to run `REMOTE_ADDR=127.0.0.1 phpsh` so that WebRequest::getRawIP() will return an non-null value.
*** Bug 67009 has been marked as a duplicate of this bug. ***
Change 155174 had a related patch set uploaded by BryanDavis: Set _SERVER['REMOTE_ADDR'] in cli mode https://gerrit.wikimedia.org/r/155174
Change 155174 merged by jenkins-bot: Set _SERVER['REMOTE_ADDR'] in cli mode https://gerrit.wikimedia.org/r/155174
This fix was reverted in I288974f6cb8899862eccd6dba5a37adba101855e. Hopefully most people are using hhvm and not phpsh now.
Somehow phpsh is still working for me (when zend role is enabled), albeit with: --- subprocess died with return code: 0 PHP died. Restarting php --- Not sure the cause of that bug.