Archive for November, 2008

Disabling PHP in a specific directory

To disable the PHP processor in a given directory, put the following in an .htaccess file. If one doesn’t exist, create it.

# Disable PHP
AddHandler default-handler php
RemoveType application/x-httpd-php php

# Make .php files display as plain text
AddType text/plain php

This assumes an Apache server. PHP on IIS may involve different steps.

Files starting with a . are hidden by default on *nix OSes. To see them in listings, use ls -a.

IBM DB2 patch for MediaWIki

MediaWiki is the software that powers sites like Wikipedia, Ubuntu Help Wiki, and many others.

In my spare time, I’ve written a patch to add IBM DB2 support to the development trunk. Hopefully, it will be added to the official source soon.

In the meantime:

There is a very good reason for the filenames.

This is all under GPL, so don’t look at it if you work on closed-source wikis.;-)