Summary: Math in mediawiki didn't work. Run

Code:
# fmtutil-sys --all
Man, I had a bear of a time tracking this one down and figured I need to write it someplace so Google can find it.

I had a server with two main partitions, which I used to host a MediaWiki site (among other things). Formerly it was running Gentoo, but I recently installed Fedora 9. I wiped the system partition and installed Fedora in it, and the data partition was carried over unchanged.

Now after some small configuration issues, I got my wiki up and running, except for math. The outward sign of failure was (PNG conversion failed; check for correct installation of latex, dvips, gs, and convert). I was able to get a command line for texvc out of the wiki debugging system, and the odd thing is that when I ran texvc as root with the same command line, it worked fine.

I learned quite a bit about PHP and Objective CAML trying to just get enough information out of the thing to know where it was failing. Finally I found that latex was looking for and not finding file 'latex.fmt'.

When I ran texvc as root, at some point it started LaTeX, and that instance of LaTeX looked around, didn't find its config files, and therefore ran mktexfmt to make the config files for root only (config files stored in a .dir in /root). Logging in as apache doesn't work, since there is no shell and no home dir.

I finally looked at the man page for mktexfmt. That man page redirected to one for fmtutil and fmtutil-sys. Running the latter as root built the system-wide config files that LaTeX needed.

Maybe this is a bug in the LaTeX package? Maybe the package install script should run this? I don't know, I just know that my math works now.