Monday, April 18, 2016

Server-Side Includes, Apache, and Subversion: svn: E200014: Checksum mismatch

If you look up the checksum mismatch error in the title, you'll get lots of advice about how to modify your working copy, fix your local checksum in svn/entries, and so on. Sometimes, however, that's not your issue.

If you're getting a checksum mismatch when checking out a .shtml file or some other file and it can't be explained by a problem with the working copy (say, for instance you haven't checked the file out yet), then try the following:

svn cat https://your-server.com/path/to/file

If you get a message of the form

[an error occurred while processing this directive]

then you should check your Subversion server's settings. If it is allowing includes:

Options Includes

then you will want to turn that off for the Subversion directory/location paths you're serving. This will cause Apache to leave them alone and serve them like any other files. This also alleviates a potential security issue, as one could imagine a malicious user checking in .shtml files to cause operations to happen on your server in unexpected ways.