Last modified: 2011-05-05 15:13:09 UTC
Using the following configuration from the toolserver: $wgForeignFileRepos[] = array( 'class' => 'ForeignDBRepo', 'name' => 'shared', 'url' => 'http://upload.wikimedia.org/wikipedia/commons/', 'hashLevels' => 2, 'dbType' => 'mysql', 'dbServer' => 'commonswiki-p.rrdb', 'dbName' => 'commonswiki_p', 'dbUser' => $wgDBuser, 'dbPassword' => $wgDBpassword ); api.php returns the following: <?xml version="1.0"?> <api servedby="wolfsbane"> <error code="internal_api_error_DBConnectionError" info="Exception Caught: DB connection error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)" xml:space="preserve"> #0 /home/valhallasw/src/phase3/includes/db/DatabaseMysql.php(131): DatabaseBase->reportConnectionError(' Can't connect ...') #1 /home/valhallasw/src/phase3/includes/db/Database.php(518): DatabaseMysql->open(false, 'valhallasw', '...', 'commonswiki_p') #2 /home/valhallasw/src/phase3/includes/db/Database.php(566): DatabaseBase->__construct(false, 'valhallasw', '...', 'commonswiki_p', 0, 'get from global') #3 /home/valhallasw/src/phase3/includes/filerepo/ForeignDBRepo.php(47): DatabaseBase::newFromType('mysql', Array) #4 /home/valhallasw/src/phase3/includes/filerepo/LocalFile.php(257): ForeignDBRepo->getMasterDB() #5 /home/valhallasw/src/phase3/includes/filerepo/LocalFile.php(328): LocalFile->loadFromDB() #6 /home/valhallasw/src/phase3/includes/filerepo/LocalFile.php(556): LocalFile->load() #7 /home/valhallasw/src/phase3/includes/filerepo/FileRepo.php(120): LocalFile->exists() #8 /home/valhallasw/src/phase3/includes/filerepo/FileRepo.php(173): FileRepo->findFile(Object(Title), Array) #9 /home/valhallasw/src/phase3/includes/filerepo/RepoGroup.php(188): FileRepo->findFiles(Array) #10 /home/valhallasw/src/phase3/includes/api/ApiQueryImageInfo.php(81): RepoGroup->findFiles(Array) #11 /home/valhallasw/src/phase3/includes/api/ApiQuery.php(268): ApiQueryImageInfo->execute() #12 /home/valhallasw/src/phase3/includes/api/ApiMain.php(667): ApiQuery->execute() #13 /home/valhallasw/src/phase3/includes/api/ApiMain.php(351): ApiMain->executeAction() #14 /home/valhallasw/src/phase3/includes/api/ApiMain.php(335): ApiMain->executeActionWithErrorHandling() #15 /home/valhallasw/src/phase3/api.php(130): ApiMain->execute() #16 /home/valhallasw/src/tsapi/api.php(83): require('/home/valhallas...') #17 {main} </error> </api> This has probably been introduced in r80864.
Fixed in r87498. However, the same bug seems to exist in another filerepo file: r1=80864&r2=80863&pathrev=80864">http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/extauth/MediaWiki.php?r1=80864&r2=80863&pathrev=80864 I cannot currently check if the bugfix is correct there.