Jump to content

Topic on Project:Support desk

[RESOLVED] Mediawiki 1.21.1 upgrade issue.

11
174.55.49.105 (talkcontribs)

My apologies if this is a stupid question:

I use GoDaddy hosting. The url is: http://www.elisoftware.org

I went through the process of upgrading MySQL to 5.0.96, PHP to 5.3.24, and MediaWiki to 1.21.1. I am surprised it works at all... but it does with one notable error: I can't edit a page or click on a Category without getting HTTP Error 500 (Internal Server Error).

When I look at the error logs, I am getting tons of:

[dir:error] [client x.x.x.x:xxxx] Inside mod_dir, setting document_root to PARENT_DOCUMENT_ROOT : /var/chroot/home/content/...

Any ideas? .htaccess? PHP issue?

Any help troubleshooting would be greatly appreciated.

Thank you.

88.130.105.44 (talkcontribs)

Hi!

Your PHP and MySQL versions look good - should work. :-)

Apache writes that mod_dir would provide for "trailing slash" redirects and that it serves directory index files.

However, I have never seen this error message. What part of the message changes and which does not?

174.55.49.105 (talkcontribs)

Most look like this:

[Sat Jul 06 16:03:35 2013] [3578332] [dir:error] [client 96.47.225.82:55075] Inside mod_dir, setting document_root to PARENT_DOCUMENT_ROOT : /var/chroot/home/content/32/3578332/html

with just the client changing.

Sometimes the path will also have a referer on it:

/var/chroot/home/content/32/3578332/html, referer http://elisoftware.org/index.php?title=Special:RecentChanges

Thank you so much for replying.

88.130.105.44 (talkcontribs)

I don't know the reasons, however, this is not normal. The error comes from Apache; obviously Apache is somehow configured incorrectly, most likely related to the value of document_root, which leads to the problem in mod_dir. If you don't take care for Apache yourself, then your hoster should fix that.

174.55.49.105 (talkcontribs)

Thank you again. I am still leaning towards the problem being either:

.htaccess or php5.3?

When I look at the Apache logs I don't see anything that looks wrong. Also- Apache is serving lots of pages without a problem. I only run into trouble trying to save an edited page, or when I try to go to a Category.

88.130.105.44 (talkcontribs)

Ohh, I thought the lines, which you posted, would come from the Apache log. But they don't?

MediaWiki should also work with PHP 5.4. So if you suspect PHP 5.3 to be the culprit, maybe you can switch the domain to PHP 5.4 and see, if that helps.

.htaccess is kind of an Apache configuration file. So maybe it is possible to cause such an error there. You could try trimming down .htaccess to the lines, which are absolutely needed - maybe it also works without any .htaccess file, but I am not sure about that...

174.55.49.105 (talkcontribs)

I really, really appreciate the help. And I also feel like I'm not too smart with this.... But I think I am much closer to understanding my problem. I have been casually using Mediawiki for a long time... I also have performed a lot of casual updates without really diving into all of the changes. This is the first upgrade I have really run into problems. I see that localsettings.php has changed a lot. I am still using an old 170 line file. I see the new baseline file is over 6,000 lines. I think that something in my old localsettings.php is probably causing the problem. So I modified the new localsettings.php as best I could. When I try to run update.php now, I get:

Warning: Invalid argument supplied for foreach() in /home/content/32/3578332/html/eli/includes/objectcache/SqlBagOStuff.php on line 232

Warning: Invalid argument supplied for foreach() in /home/content/32/3578332/html/eli/includes/objectcache/SqlBagOStuff.php on line 232 A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script Query: SELECT page_title FROM `page` WHERE page_is_redirect = '0' AND page_namespace = '8' AND (page_title NOT LIKE '%/%' ) AND (page_len > 10000) Function: MessageCache::loadFromDB(en)-big Error: 1146 Table 'elisoftwarewiki.page' doesn't exist (elisoftwarewiki.db.3578332.hostedresource.com) Backtrace:

  1. 0 /home/content/32/3578332/html/eli/includes/db/Database.php(983): DatabaseBase->reportQueryError('Table 'elisoftw...', 1146, 'SELECT page_ti...', 'MessageCache::l...', false)
  2. 1 /home/content/32/3578332/html/eli/includes/db/Database.php(1434): DatabaseBase->query('SELECT page_ti...', 'MessageCache::l...')
  3. 2 /home/content/32/3578332/html/eli/includes/cache/MessageCache.php(432): DatabaseBase->select('page', 'page_title', Array, 'MessageCache::l...')
  4. 3 /home/content/32/3578332/html/eli/includes/cache/MessageCache.php(345): MessageCache->loadFromDB('en')
  5. 4 /home/content/32/3578332/html/eli/includes/cache/MessageCache.php(710): MessageCache->load('en')
  6. 5 /home/content/32/3578332/html/eli/includes/cache/MessageCache.php(650): MessageCache->getMsgFromNamespace('Mainpage', 'en')
  7. 6 /home/content/32/3578332/html/eli/includes/Message.php(720): MessageCache->get('mainpage', true, Object(Language))
  8. 7 /home/content/32/3578332/html/eli/includes/Message.php(464): Message->fetchMessage()
  9. 8 /home/content/32/3578332/html/eli/includes/Message.php(553): Message->toString()
  10. 9 /home/content/32/3578332/html/eli/includes/Title.php(370): Message->text()
  11. 10 /home/content/32/3578332/html/eli/includes/Wiki.php(89): Title::newMainPage()
  12. 11 /home/content/32/3578332/html/eli/includes/Wiki.php(130): MediaWiki->parseTitle()
  13. 12 /home/content/32/3578332/html/eli/includes/Wiki.php(538): MediaWiki->getTitle()
  14. 13 /home/content/32/3578332/html/eli/includes/Wiki.php(458): MediaWiki->main()
  15. 14 /home/content/32/3578332/html/eli/index.php(59): MediaWiki->run()
  16. 15 {main}

I am guessing that if I can figure out what I am doing wrong, I can probably get it working properly...

88.130.92.124 (talkcontribs)

Hi!

When you speak of this new localsettings.php with 6.000 lines of code, I think you mean DefaultSettings.php. That file contains all possible variables and sets default values for all of them. As far as you want to change them, you can do so in LocalSettings.php. But you do not have to do that; often the defaults should be fine.

Someone else had the same problem, but he stopped responding.

You get a MySQL error, when you try to run update.php (Error: 1146 Table 'elisoftwarewiki.page' doesn't exist). Obviously the table "page" is missing. However, it seems like I can browse your wiki just normal... Can you check, if this table is really missing inside the DB?

174.55.49.105 (talkcontribs)
mw_oldimage
mw_page
mw_pagelinks

etc.

I do now recall that there is a setting for a prefix on tables? And I may not have updated that on the new localsettings.php...? I will try. You are also correct- I used the new defaultsettings.php as my template for a new localsettings.php- under the presumption that there is something wrong with my old localsettings.php (but I am not sure what).

If I run mediawiki with the new localsettings.php, you will not see pages. You wioll only see the error.

If I run the mediawiki with the old localsettings.php, you can see pages, but I get the error if T try to save an edited page or if I try to view a Category page.

Thank you once more.

174.55.49.105 (talkcontribs)

UPDATE! IT'S WORKING!

I will have to do a lot of testing/debugging with all of the extensions- but so far so good!

So there is something depricated in my old localsettings.php that is causing the serious problem. Using the new localsettings.php based on the new defaultsettings.php, my mediawiki appears to be functioning again.

One small issue that I am sure I can figure out is my logo is not showing with:

$wgLogo = "{$wgStylePath}/common/images/elisoftware.png";

Might I have a bigger 'path' issue?

Thank you a million times again for the replies and help.

88.130.92.124 (talkcontribs)

The category pages show again and also the logo is there.

Great to see it working!

Reply to "[RESOLVED] Mediawiki 1.21.1 upgrade issue."