Manual talk:Running MediaWiki on macOS

Mathematics
To display nontrivial Mathematical expressions, the system requires some additional software: LaTeX, ImageMagick, and gs. These are not provided in OSX and so many OSX users install these things using the FINK system. That puts them in the directory path /sw instead of /usr. I do not yet know how to tell Apache that such things exist, so on my OSX machine, Mathematics does not work. I'm posting this here in case others have a suggestion for solving this on an OSX/Fink system. After a solution is found, it would make sense to add content to this site, but for now I've put these remarks in the 'Discussion' category. (Dan Kelley)

HOW I DID IT
I've just gone through the TeX pain, so, while it's fresh in my memory, let me describe everything I did. sudo port -d selfupdate
 * 1) I'm assuming that, per the main page instructions you already have ImageMagick installed.
 * 2) I'm also assuming that you have the developer tools (compilers and so installed). If not, do a google search telling you how to install Xcode.
 * 3) Go to http://www.macports.org/ and download the MacPorts installer, if you have not already done so.
 * 4) Open a command-line tool, and update your MacPorts installation and port definitions to the latest ones (in case what you downloaded is slightly out of date)
 * 1) Note that MacPorts will update your PATH to include /opt/local/bin. Because of this, you should now open a new terminal window to start a shell that has this new PATH. Check your PATH with echo $PATH and, if it does not include /opt/local/bin (to hold MacPorts programs) and /usr/local/bin (for ImageMagick programs), edit your ~/.bash_profile or whatever config file you use appropriately.

Use MacPorts to download and install ocaml, tetex, ghostscript sudo port install ocaml sudo port install teTeX sudo port install ghostscript (If you have any of these already installed, you may wish to use the port upgrade command to bring them up to date.)

OK, so at this stage we have the binaries we need /opt/local/bin/latex, /opt/local/bin/dvips /usr/local/bin/convert (from the ImageMagick installation)

Now type cd /Library/WebServer/Documents/wiki99/math (or wherever you installed your wiki. Other possibilities might be things like /Library/WebServer/Documents/mediawiki/math or ~/Sites/w/math)

texvc 1
Now we are faced with the following problem. The mediawiki code, running inside apache, and thus as user www, wants to execute a program, texvc, that will convert a block of TeX into something useful, perhaps a string of HTML or MathML, perhaps a PNG image. Texvc in turn relies on latex, dvips and convert to do its work. This means that mediawiki has to know where texvc is, and that texvc has to know where latex, dvips and convert are. Mediawiki knows where texvc is because the mediawiki code has the address of texvc hardwired as being inside the wiki/math directory. But how does texvc know where the three programs it wants to use are? That's where you get all sorts of the problems described in various comments on this page.

Apple has been (to its credit) very aggressive about ensuring that people who don't know what they are doing cannot easily make their system insecure. Part of this is that apache (and programs that apache launches) are given a very restricted PATH so that it's less likely that unwanted code can somehow land up being run. The apparent way around this, the suggestion give in a comment on this page, and on the BSD installation page, about using PHP, in the LocalSettings.php file, to modify the PATH variable to get around this does not appear to work, at least not on 10.3.9, and I'm guessing Apple closed that down as a security hole.

Much better is what we are going to do which is forget screwing around with the PATH which is a security risk, and just tell the texvc code EXACTLY where the apps it needs live. So, while still in the wiki/math folder, open the file render.ml and at change the top four lines to let cmd_dvips tmpprefix = "/opt/local/bin/dvips -R -E " ^ tmpprefix ^ ".dvi -f >" ^ tmpprefix ^ ".ps" let cmd_latex tmpprefix = "/opt/local/bin/latex " ^ tmpprefix ^ ".tex >/dev/null" let cmd_convert tmpprefix finalpath = "/usr/local/bin/convert -quality 100 -density 120 " ^ tmpprefix ^ ".ps " ^ finalpath ^ " >/dev/null 2>/dev/null" let cmd_dvipng tmpprefix finalpath = "/opt/local/bin/dvipng -gamma 1.5 -D 120 -T tight --strict " ^ tmpprefix ^ ".dvi -o " ^ finalpath ^ " >/dev/null 2>/dev/null"

(For each line all that is changed is that the application name is now given a full path)

With this change in place, now type make and ocaml will build texvc with these paths hardwired. (That's why we needed to download ocaml earlier; it is used to compile texvc, but is not used after we have built texvc.)
 * (just a note in 2010, up to here, using TeXlive via port, this works on 10.6 using ports ImageMagic and I did not need to do the next step)

ImageMagick's convert
There's one path issue left; convert/ImageMagick needs to be able to find ghostscript. Now if ImageMagick had been written in the proper UNIX fashion you would be able to FULLY configure it via command-line strings. But, sadly, ImageMagick was written by a bunch of morons who, apparently, think that the stupid and painful ways of Windows are the right way to write software. So, how are we going to tell ImageMagick where to find ghostscript? We cannot use a path, we cannot set environment variables. The only option left is to change the ImageMagick config file. Ideally we'd make such a change to a wiki-specific version of the file that would be passed in via command-line, but of course that's too UNIXys and sensible an approach for ImageMagick, so we have to modify the system-wide config file. Open /usr/local/lib/ImageMagick-6.1.7/config/delegates.xml in your editor of choice. (Of course the version number may be different for you.) Make sure you open it sudo so you can store your changes. Now do a search-and-replace changing "gs" to "/opt/local/bin/gs" NOTE. The " above are NOT decoration. Search for the string "gs" not gs. If you search for just gs you will get a bunch of values like "gs-color" that have no relevance to what we are trying to achieve.

Note: I installed this on OS X x86 10.4.8 using MacPorts. ImageMagick was located at /opt/local/lib, not /usr/local/lib. (2006-Oct-06)

texvc 2
Now we need somewhere for texvc to store its tmp junk, and to store its slightly more permanent images. The suggested location is in the wiki/images directory, so go there and create two folders, one called math, one called tmp. You need to ensure that user www can read and write to both of these. (I personally create everything in my WebServer folder as owned by www, and with group of handleym, my user group. This means www can read and write, and I can also read and write without having to use sudo on the command line. But it's your choice how you structure things; you may prefer to set both owner and group to www, or set owner to root and group to www. Just make sure that folders image/math and images/tmp are at least either owned by www and have owner permissions set to read+write, or have group owner set to www and have group permissions set to read+write.)

Check that you got something that worked using a command line like ./texvc '/Library/WebServer/Documents/wiki99/images/tmp' '/Library/WebServer/Documents/wiki99/images/math' '\int_{-N}^{N} e^x\, dx' 'utf-8' (As before, replace the two wiki99/images paths with the math and tmp paths we just created above. Assuming this worked, we should get a cryptic line of output, This is dvips(k) 5.95a Copyright 2005 Radical Eye Software (www.radicaleye.com) ' TeX output 2005.07.23:0928' ->  . [1] l4e053ca66cfc79a2397c40aa34c66a25 1 Also look in the images/math directory where there should be a *.png file. (If something went wrong in the conversion to a png, there will also be a *.tex file in images/tmp.) Toss the *.png and *.tex files now.

Note: On OS X x86 10.4.8 using MacPorts, ImageMagick installed to /opt/local/lib instead of /usr/local/lib. I had to copy convert to /opt/local/lib before the *.png file showed up. Works peachy now. (2006-Oct-06)


 * Hello all what you described worked fine for me, however after enableing tex support as you described below, I obtain the following error when i try to generate a math formula. Failed to parse (PNG conversion failed; check for correct installation of latex, dvips, gs, and convert): \int_{-N}^{N} e^x\, dx. What puzzles me I can do it manually but somehow the wiki does not handle it correctly, any idea? thanks ±±±

Enabling LaTeX equations in MediaWiki
Now let's test that it all works in the more restricted PATH environment of apache. Type (bash syntax, if you are using tcsh use the appropriate tcsh syntax) export PATH=/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin echo $PATH Test it by with which latex which dvips which gs which convert Each command should give you an empty response.

Now run the above command-line again and you should get the same results, along with the same output png file, which you should again toss.

If we've got to this stage OK, then texvc, the apps it uses, and the directories where it dumps stuff are all working. The last stage is to hook up mediawiki. Open LocalSettings.php and look for the line Uncomment this line by removing the #. I assume you also have set some useful value on your mediawiki preferences page for "Rendering math" preference. I set this to "Recommended for modern browsers" (and have no idea what happens if you use anything else).
 * 1) $wgUseTeX

Now open a page on your wiki, edit it, and add somewhere something like $$\int_{-N}^{N} e^x\, dx$$ and preview. With luck you'll get a nicely rendered png.

If anything goes wrong, all I can suggest is what I did to debug this stuff which is the following: mediawiki calls texvc in the file wiki/includes/math.php, at line 63. You can debug what is going on to some extent by stuffing a string into the error string and returning immediately; the error string will then be displayed in red when you try to preview a page. For example add the line return $this->_error( $cmd ); right after the line (line 68) wfDebug( 'TeX: '.$cmd ); and you will see the command-line that is launching texvc displayed in red when you try to preview your math. From this point, just use standard debugging to try to isolate the problem.

One final thing you might want to do: The paths used above to store the temp latex png files I don't like because I don't think it's a good idea to have ephemeral non-persistent data stored in directories where it can hang around forever. I changed my LocalSettings.php file to set $wgMathPath        = "/tmp"; $wgMathDirectory   = "$IP/../tmp"; $wgTmpDirectory    = "$IP/../tmp"; which will dump both the intermediate .tex files and the ultimate .png files in /Library/WebServer/Documents/tmp which is what I try to use for all my www tmp stuff. (Permission issues mean you can't use the standard system /tmp to hold this stuff.) If you do this, once again this tmp directory you create must be read/writable by www. It's your choice whether you this sort of system hygiene matters to you or not.

laptop prices in pakistan

(Maynard Handley)

10.4 and ImageMagick
More ImageMagick love here. I ran into the same problem with math support that everybody else has under OS X: it doesn't work. I actually proceeded along the same lines as Handley above, figuring it was just a path issue -- texvc test was working ...mostly.

There's an issue with ImageMagick and png output: you get garbage. The same happens for JPG. So, I changed the output to gif. To do this, just execute a search and replace (usually deadly, but fine here) on render.ml and texvc_vgi.ml and recompile texvc.

In the file wiki/includes/math.php, you'll have to search and replace ".png" to ".gif" to let it find and link to new gif files.

(Alex Warren)

Check for Spaces in Directory Names
It shouldn't be this way, but if you've followed all of the above steps, and things still aren't working, check to make sure that there are no spaces in the directory path to the wiki. I have tried to tweak the code to make it handles spaces gracefully, but it doesn't work. If you need spaces in your path, your best bet is to set up a symbolic link (ln -s) that doesn't have spaces, and modify $IP in LocalSettings.php to use that path.

Symptoms that indicate this might be the problem: things work fine on the command line (good output), but images are not being saved. The error (unless you've debugged) is the nondescript "check your setup".

(Steven Skoczen)

I followed all of these steps (Thanks to all.), but it still doesn't work. I get

Failed to parse (&lt;./math/texvc '/Library/WebServer/Documents/latex/images/tmp' '/Library/WebServer/Documents/latex/images/math' '\int_{-N}^{N} e^{x}\,\textrm{d}x' 'utf-8'&gt;): \int_{-N}^{N} e^{x}\,\textrm{d}x

when I try to put the math tags in a page. Everything is fine from the command line and I have no spaces in paths. Any thoughts?

(Jon Breitenbucher)


 * I've the same problem. 15:31, 28 March 2006 (UTC)


 * Update to 1.5.8. :D 18:10, 29 March 2006 (UTC)

Math on OS X Server 10.4 using Fink
A brief, and hopefully complete, install procedure that worked on OS X server 10.4.3 with mediawiki 1.5.6 and using Fink:

1) Install gcc 4 or later (Xcode for Tiger includes this)(I still had gcc 3.3 and linking failed when trying to make texvc).

2) Use Fink to install: ocaml, imagemagick (installs convert), tetex (installs dvips and latex), ghostscript (installs gs), libpng

3) Now you can make texvc /Library/WebServer/Documents/wiki/math/make 4) Add the path to /Library/WebServer/Documents/wiki/LocalSettings.php so Apache can find the packages installed with Fink $path = getenv("PATH"); putenv("PATH=$path:/sw/bin"); 5) Uncomment this in /Library/WebServer/Documents/wiki/LocalSettings.php to enable it all in your wiki $wgUseTeX	= true;

If that was smooth, you can test it:

$$a^{c+2}$$ should produce the following html

$$a^{c+2}$$

You can force the result to be PNG by adding \, to the end of a formula.

$$a^{c+2}\,$$ should produce the following PNG

$$a^{c+2}\,$$

If you had pages with math tags already in them you may have to save them again to have the existing formulas display correctly.

(Paul Wilhite)

If at first you don't succeed...
As a last resort, you can make symbolic links to each program in.

A note on 10.4 install
In my install, I had a problem with the operating system path and the webpath not agreeing. The work around was to have the variables set as follows:

$wgUploadPath      = "$wgScriptPath/up_loads"; $wgUploadDirectory = "$IP/up_loads"; $wgMathPath        = "{$wgUploadPath}/images/math"; $wgMathDirectory   = "{$wgUploadDirectory}/images/math"; $wgTmpDirectory    = "{$wgUploadDirectory}/images/tmp";

Then make sure you have files in you install base /up_loads such as ~/Sites/wiki/up_loads/images/math and ~/Sites/wiki/up_loads/images/tmp. This seems a little non-standard, so there may be a better way to do this, I don't know.

One more try
After following everything closely, I finally had to recheck the render.ml. I guess mediawiki has changed since the above was written. The first 10 lines have to be (or something close):

let cmd_dvips tmpprefix = "/opt/local/bin/dvips -R -E " ^ tmpprefix ^ ".dvi -f >" ^ tmpprefix ^ ".ps" let cmd_latex tmpprefix = "/opt/local/bin/latex " ^ tmpprefix ^ ".tex >/dev/null" let cmd_convert tmpprefix finalpath = "/opt/local/bin/convert -quality 100 -density 120 " ^ tmpprefix ^ ".ps " ^ finalpath ^ " >/dev/null 2>/dev/null" let cmd_dvipng tmpprefix finalpath = "/opt/local/bin/dvipng -gamma 1.5 -D 120 -T tight --strict " ^ tmpprefix ^ ".dvi -o " ^ finalpath ^ " >/dev/null 2>/dev/null" (* Putting -transparent white in converts arguments will sort-of give you transperancy *) let cmd_convert tmpprefix finalpath = "/opt/local/bin/convert -quality 100 -density 120 " ^ tmpprefix ^ ".ps " ^ finalpath ^ " >/dev/null 2>/dev/null" (* Putting -bg Transparent in dvipng's arguments will give full-alpha transparency *) (* Note that IE have problems with such PNGs and need an additional javascript snippet *) (* Putting -bg transparent in dvipng's arguments will give binary transparency *) let cmd_dvipng tmpprefix finalpath = "/opt/local/bin/dvipng -gamma 1.5 -D 120 -T tight --strict " ^ tmpprefix ^ ".dvi -o " ^ finalpath ^ " >/dev/null 2>/dev/null"

You have to fully qualify lines 6 and 10 too. -Royalguard11 (Talk·@en) 03:21, 4 March 2007 (UTC)

My changes to the above Math Installation procedure
Kiodane 22:03, 7 May 2009 (UTC)
 * MacPorts installs into /opt not /usr, so all changes related to the /usr path needed to be /opt
 * MacPorts installed a newer version of ImageMagick than specified in the guide. Use tab-completion to navigate to the correct location of the ImageMagick-x.x.x/config/delegates.xml file, again also in the /opt folder.
 * When altering the path to the  command, my delegates.xml file did not use normal quotation marks to state  .  Instead, it used   which is rendered as a   but is not search-replaceable as the same.

More Mathematics
In the section on Install on FreeBSD it has some hints including how to add to the path for Apache. Some of the things that you install on FreeBSD don't seem to be available on fink, or called something different. I would really like this to work on my OS X box. The setup to this point took about half an hour, but I see that getting a lot longer in order to get Tex working.


 * What seems to be missing? I just tried it on my PowerBook and it seems fine... You'll want the ocaml, tetex, latex, imagemagick, and ghostscript packages.


 * Note that the fink /sw/bin PATH likely won't be available to apache by default, so try adding this to LocalSettings.php to get the shelled-out programs working:

$path = getenv("PATH"); putenv("PATH=$path:/sw/bin");
 * --Brion VIBBER 23:25, 10 Sep 2004 (UTC)

Troubleshooting
Not sure how to organise information on this subject in terms of general observations and tips vs. getting help for specific problems, which to put on the main content page, which to put in the discussion page, and whether there needs to be a seperate page for certain things. Any ideas? - Jackdavinci 21:41, 13 May 2005 (UTC)

MediaWiki on Mac OS 10.4 with XAMMP
When installing MediaWiki on a XAMPP installation make sure your remove the lines from /[yourwiki]/config/index.php that are about postgressSQL. There are right after the list of files that are required by the script. When you don't remove then the script keeps crashing apache because some library couldn't be found. --139.179.209.97 17:24, 4 December 2007 (UTC)

Mac OS 10.4 (Tiger)
After installing Tiger my (intraoffice) mediawiki site stopped working. I found I had to redo the following steps:


 * Change the permissions back to allow access to the wiki folder
 * Remodify the file /etc/httpd/httpd.conf
 * Change "#LoadModule php4_module libexec/httpd/libphp4.so" to "LoadModule php4_module libexec/httpd/libphp4.so" (take out "#")
 * Change "#AddModule mod_php4.c". to "AddModule mod_php4.c" (take out "#")
 * Change "AddType application/x-httpd-php .php" to "AddType application/x-httpd-php .php .phtml" (add ".phtml")

I also found that simpletext no longer liked opening config files, so I downloaded the freeware TextWrangler. (Using pico in terminal mode is not as easy). Might be able to work around this by changing the preferences in TextEdit.

In addition, spotlight seems unable to find the files in the /etc folder, so I now go the main drive, hit shift-command-G for "go to folder" and enter "etc" to access these files.

- Jackdavinci 21:41, 13 May 2005 (UTC)

10.4.4 Upgrade

After updating Tiger to 10.4.4, mediawiki 1.5 stopped working for me, with the following error:

Fatal error: Call to a member function on a non-object in /Library/WebServer/Documents/w/includes/Database.php on line 1667

Upgrading to 1.5.5 gave a more useful error, which indicated that PHP was unable to connect to the MySQL database using something like /var/mysql/mysql.sock. I found that following the instructions on the Apple support page Mac OS X Server 10.4: Issues connecting PHP to MySQL solved the problem. I used the second method on that page, and did not attempt the first (though presumably both would work).

--155.52.50.119 20:44, 11 January 2006 (UTC)


 * I had a similar problem. I was using the default php installation and MySQL 5. MySQL was using /tmp/mysql.sock, but php apparently could not find it. I followed the second method on the page you linked, but I did this instead: mysql.default_socket = /tmp/mysql.sock --17.202.34.115

Intranet Mac/PC compatability problems
I have a mediawiki running fine off of a flat panel iMac with Tiger (OS X 10.4) for my office to use as an intranet. There are two macs and about fifteen or so PCs connected to the router/server which has a firewall limiting outside access. I can access the wiki from either PC or Mac using the IP address (http://(my.ip.address.numbers)/~wiki/mediawiki/index.php/Main_Page) or just on the mac using the network address (http://imac.local/~wiki/mediawiki/index.php/Main_Page). Everything works fantastically from both the mac the wiki is served from and also on the other mac on the network. Almost everything seems to also work fine from the PCs except for editing pages. Previewing works fine, and the edit itself saves fine, but after hitting the submit button it displays the following:


 * The page cannot be displayed
 * The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.

I suspect it might have something to do with the fact that while browing on the mac using the IP address instead of the network address (http://###.##.#.###/~wiki/mediawiki/index.php/Main_Page instead of http://imac.local/~wiki/mediawiki/index.php/Main_Page), any link I hit will continue to use the IP address except for when I hit the submit button on an edit, then it will redirect back to the page I just edited, but using the network address instead. For example, I go to http://###.##.#.###/~wiki/mediawiki/index.php/Sandbox, make a change, and hit submit. First it goes to http://###.##.#.###/~wiki/mediawiki/index.php?title=Main_Page&action=submit, then it redirects to http://imac.local/~wiki/mediawiki/index.php/Sandbox.

Any ideas? - Jackdavinci 21:41, 13 May 2005 (UTC)

Add the following line to LocalSettings.php eliminates the redirect to yourname.local

$wgServer          = "http://your.name.com";

Of course change the above to reflect your address.

Mac Installation Problem
Having a problem with Tiger/Safari on a local machine installation. Transferred to a Mac after my PC crapped out. Transferred the wiki to the Mac and after some table modifications was able to get my wiki to show up. But now whenever I edit a page and hit save, I get the following:

Safari can’t find the server. Safari can’t open the page “http://186.204.254.10.in-addr.arpa/~mattmiller71/mediawiki/index.php/Aug_06_2005_Daily_Notes” because it can’t find the server “186.204.254.10.in-addr.arpa”.

I can't figure out on my own why this is happening but I think it has something to do with local allocation of IP addresses. The article changes, by the way, are actually saved and if I navigate to the page from my main page, I'll see the changes which means we're getting past that write and bombing in the display.

Running: Tiger 10.4.2 on Mac iBook G4, PHP v 4.3.11, Apache 1.3.33

Any thoughts?

Mac Installation Problem Version 2
Checking environment... PHP 4.3.11: ok PHP server API is apache; ok, using pretty URLs (index.php/Page_Title) Have XML / Latin1-UTF-8 conversion support. PHP is configured with no memory_limit. Have zlib support; enabling output compression. Turck MMCache not installed, can't use object caching functions Couldn't find GD library or ImageMagick; image thumbnailing disabled. Installation directory: /Library/WebServer/Documents/wiki Script URI path: /wiki Connected as root (automatic) Connected to database... 4.1.14-standard; enabling MySQL 4 enhancements Database wiki exists There are already MediaWiki tables in this database. Checking if updates are needed... Granting user permissions... ...linkscc table already exists. ...hitcounter table already exists. ...querycache table already exists. ...objectcache table already exists. ...categorylinks table already exists. ...logging table already exists. ...user_rights table already exists. ...have ipb_id field in ipblocks table. ...have ipb_expiry field in ipblocks table. ...have rc_type field in recentchanges table. ...have rc_ip field in recentchanges table. ...have rc_id field in recentchanges table. ...have rc_patrolled field in recentchanges table. ...have user_real_name field in user table. ...have user_token field in user table. ...have ur_user field in user_rights table. ...have log_params field in logging table. ...have ss_total_pages field in site_stats table. ...already have interwiki table ...indexes seem up to 20031107 standards ...linkscc is up to date, or does not exist. Good. Converting links table to ID-ID... Sorry! The wiki is experiencing some technical difficulties, and cannot contact the database server.

Sorry for it being a bit long, but I'm stumped... I'm running 10.4 Server -- Macaddct1984 03:28, 28 September 2005 (UTC)

Software
Another option is to use Mactex that comes with a simple OS X friendly installer configured for OS X. It includes You will still need to install the OCaml but now it also comes with an OS X installer.
 * 1) Tex
 * 2) Ghostscript
 * 3) ImageMagick

Configuration

 * 1) open LocalSettings.php and change $wgUseTeX=false to $wgUseTeX=true to enable component


 * 1) cd to /Volumes/ /math
 * 2) issue the make command
 * 3) * compiles the texvc

Error during linking
This is the current error I've encountered:

ocamlopt -o texvc unix.cmxa util.cmx parser.cmx html.cmx mathml.cmx texutil.cmx render.cmx lexer.cmx texvc.cmx ld: Undefined symbols: _sprintf$LDBLStub _fprintf$LDBLStub _sscanf$LDBLStub Error during linking make: *** [texvc] Error 2

Any help in a possible solution would be appreciated.

"Duplicate key" error
Putting this here in case it's just an isolated issue...

On running "Install!" from within the MediaWiki web app, I got a failed installation (timeout) which if re-ran gave a "duplicate key" error. I don't know what was wrong, but I do know how to fix it. These instructions were gleaned from an alternative installation guide, which seems to do manually what MediaWiki now does automatically. However, in the interests of not skipping something important, in its entirety:

mysqladmin -u root -p create *wiki_dbname* mysql -u root -p -e "GRANT ALL PRIVILEGES ON *wiki_dbname* TO *wiki_user* IDENTIFIED BY '*wiki_password*'" mysql -u root -p -e "SET PASSWORD FOR *wiki_user* = OLD_PASSWORD('*wiki_password*')" mysql -u root -p -e "FLUSH PRIVILEGES"

where *wiki_dbname*, *wiki_user* and *wiki_password* are all chosen by yourself, and you'll be prompted for the SQL password after entering each line. Now re-run the web app, entering the same names and passwords, of course, and everything should work! 210.235.59.92 12:02, 6 October 2005 (UTC)

MAMP instructions not complete?
I attempted to install mediawiki using MAMP, and found I needed to check the "Use superuser account" checkbox before I could complete the MediaWiki installation (using MediaWiki 1.9.0). I used Superuser name: root and Superuser account: root. This step was needed so mediawiki could create the dbuser account in MySQL.

Alternatively, you can create the dbuser account manually using phpMyAdmin and enter its password in the installation page.

Perhaps this should be added to the instructions?

Socket
I did a normal MAMP-Install on Leopard, installed Mediawiki, and in ran fine from the beginning.

However, trying to run a maintenance script would answer with DB connection error: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) (localhost)

After a while I figured out that I had to do this: Macintosh:var mosero$ cd /var Macintosh:var mosero$ sudo mkdir mysql Password: Macintosh:var mosero$ sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock

Now it runs fine.

--84.145.73.214 14:17, 31 December 2007 (UTC) OM

Help for the confused
The entire page could be replaced by this link — HowTo: Installing MediaWiki on Mac OS X (Tiger) Sadly the link does not work at at 20131230

The above link does not have any help for installing math.

TeX on 10.4
I am not sure if this is the right place, but I followed m:Help:Running MediaWiki on Mac OS X and m:Talk:Running MediaWiki on Mac OS X to the letter (excepting that I am not using the server edition), and get a "PNG conversion failed". Can anyone suggest what might be missing? Thanks. It seems like the PNG conversion fails while texvc does something -- the tmp folder fills up with .tex files. 131.225.95.106 21:07, 26 May 2006 (UTC)

Redirect Help
Mac OS X 10 3 Server when I put in my simple domain www.mydomain.org this is what It returns back with page not found ++http://www.mydomain.org/Folder/mediawiki-1.6.7/index.php/Main_Page The help above recomended this "$wgServer          = "http://your.name.com";" but did not work. perhaps It needs to go in a special place there? Any Ideals how to drop the "/Folder/mediawiki-1.6.7/index.php/Main_Page" part? BJ

teTeX and 10.3
Is there anyway to use teTeX in 10.3.9? The basic problem here (I think) is that latex is linked to pdflatex. 68.239.96.246 02:32, 11 September 2006 (UTC)

--- Some guidance for users of MacPorts would be helpful. (the MacPorts documentation is virtually non-existent)

DNS error
We are getting a strange error, after the wiki was running fine for a while. Now, external users get a DNS error saying that

If one tries to go to our site at: http://barracloughltd.com/mediawiki

the following error comes up: It can not find http://barracloughltd-com.local

in other words, the .com is changed to -com and the /mediawiki is changed to .local

What is that all about?

If anyone has any ideas please let me know. Edward M. Roche Barraclough Ltd. eroche@barracloughltd.com

I am seeing something similar. Everything on my system runs fine for a while from a remote location and then it will try accessing the a local name for the server. For example instead of mydomainname.com it will try to read from macmini.local. macmini is the name of the computer on the local apple network.

thank yo for your help,

bryan

I also seem to be having a similar problem whenever http://192.168.1.2/wiki is loaded it becomes http://mac.local/wiki and none of the computers other than the one hosting it can then find the server

I had the same issue as above. Wiki worked fine on local machine, but if access was attempted from any other location, the url would change from http://wikihost/wiki to http://www.wikihost.local/wiki and a "server not found" error is given.

I was able to access the wiki if I used the IP address, but if I tried to edit any pages, the url reverted to the .local address when saving.

I fixed it by editing /etc/hostconfig to include the FQDN of the host, eg HOSTNAME=wikihost.domain.com

MDZ

More Math Support
Before running into the above directions, we struggled and developed our own for OSX Server 10.4, here is a link in case it can help anyone

http://nutmeg.conncoll.edu/wiki/index.php/Enabling_texvx

Search string length < 4 characters
I need to search for strings with less than 4 characters (like LCD, VAC,...)

I've added the line ft_min_word_len = 3 as described on the MediaWiki- and MySQL-sites, but always get an error message about a crashed index.

Is there anybody out there who had the same problem and got his machine running with such a configuration change and how did You do that?

btw, also the reindex-script didn't work, but that shouldn't be the problem.

My actual configuration: MacMini G4 with OS X 4.11, XAMPP 0.7.1 (Apache 2.2.6, MySQL 5.0.51, PHP 5.2.5) and MediaWiki 1.11.0

... doesn't seem to be the fault of MacOSX, I installed Debian Linux now on my Mini, it runs much faster, but also cannot handle that short-string-problem ... seems to be the fault of WikiMedia

--2007-12-31T06:23:35 212.152.164.162

You should try run "REPAIR TABLE searchindex QUICK" in mysql, to rebuild the full-text search index, after you've changed the ft_min_word_len (backup the table first). --Ans 13:58, 2 April 2008 (UTC)

Manual talk:Configuration settings suggest running maintenance/rebuildtextindex.php (this may takes several hours, depending on database size) --Ans 14:02, 2 April 2008 (UTC)

Almost working, I think
I want to install mediawiki so just I can use it (I don't want it live on the web, but I'm not really worried about keeping it secret - the contents will be nonsense to anybody else). I think I've installed everything but am at a stumbling block. MAMP indicates that Apache and mysql are working fine (green light). Mediawiki is installed in my ~user/Sites directory, and it is world-writeable. I've changed MAMP's root directory to the user/Sites directory. But navigating to the index.php file brings up a long string of what look like commands - it doesn't execute any configuration set-up process. What step am I missing? 98.218.124.185 03:21, 25 January 2009 (UTC)


 * Did you install PHP? :) —Emufarmers(T 01:21, 26 January 2009 (UTC)

Installing Math with OSX 10.5
If you have OSX 10.5 and MacPorts, getting math installed is straight forward. Install requisite software:

sudo port install ImageMagick ocaml teTeX ghostscript

Edit /System/Library/LaunchDaemons/org.apache.httpd.plist and insert the following:

EnvironmentVariables PATH /bin:/usr/bin:/sbin:/opt/local/bin:/usr/texbin

Restart apache from the sharing control panel.

Compile what's in the maths directory:

cd /your/installation/w/maths make -f Makefile

Edit LocalSettings.php and change the setting to enable TeX:

$wgUseTeX          = true;

Also, make sure you have a tmp directory in your upload folder and it is writable, otherwise you'll get a PNG Conversion failed message:

mkdir /your/installation/w/images/tmp chmod 777 /your/installation/w/images/tmp


 * This almost worked for me. I was upgrading form an original 10.4 PPC install and I had to rebuild ocaml from source w/o using ports and install that, then run make. The ocaml binary does not appear to run on 10.5. I also had to do a "make clean" in the math directory.

I thought I was there
So I got it all working finally last week without having to post any stupid posts - but now it is no longer working and I am posting...

I had MediaWiki up and running and I was creating new pages and editing exiting ones, but now when i try to navigate to the main page (or any page), FF gives me a Problem Loading page error. I have rebooted the computer since it was working so i guess something was running, that is now no longer running. I have checked that mysql is running, and that file sharing is on (I can go to the default user web page).

Any ideas? What have I missed?

OS x 10.5

Thanks in advance - --Boy.pockets 15:54, 9 September 2009 (UTC)

Installation/Solution as of 2011 Sept 18
OMFG, I finally got it working. There is no need to do anything fancy anymore. Install macports and then do the following in terminal:

sudo port install ocaml sudo port install texlive sudo port install ghostscript sudo port install ocaml sudo port install texlive-latex-extra

That last one was the long standing issue, as "cancel.sty" is not in the texlive pacage but in the latex extra (if you check the .log in the /images/tmp folder, you'll see "cancel.sty missing" is the error). Once I did that, things worked. You do not need to edit render.ml before compiling it anymore (but you do need to compile it like it says in section 1). This solves the PNG conversion failed error.

I'm very proud of this! I had to systematically hunt down the issue and solved it finally. This should resolve everything.

AzureWolf

Securing/configuring Apache
The apache config listed here includes 'Options Indexes'. Are directory indexes required for any wiki functions? AFAIK it is a good idea for security to not display these unless they are necessary. --Quantum7 (talk) 01:23, 6 March 2012 (UTC)