SQLite is a SQL powered relational database that is implemented using a file on disk, rather than a client server. This means that, among other things, you don’t need a standalone process to run a database, and it also makes backups easier.

A few weeks ago, support for sqlite landed into Known.

I put together this patch primarily to scratch my own itch; I was having to set up a lot of Known based for testing as part of client projects, and I needed a way to quickly swap around configuration and data sets. I also figured it’d help out the number of folk out there who run their Known sites on devices like the Raspberry Pi.


Firstly, make sure you’ve got SQLite support built in to php:

Then, you need to modify your config.ini

The first two lines tell Known to use SQLite for the backend database, and where this database lives. Note, that this location needs to be writeable by your web server user (usually www-data) but, for obvious security reasons, should be somewhere outside of your Known docroot, so that it can’t be downloaded!

The last two lines tell Known to use a disk based file store for pictures and other uploads. This is important as the SQLite engine currently doesn’t support file storage in database like the Mongo engine does.

That’s it! Fire up your browser and visit your site. All being well, Known will automatically create the database and set up the schema.

Bug reports and patches to the usual place!

So, a few weeks ago I hacked together some logs for the #knownchat IRC channel.

I accomplished this by hacking together a very simple IRC logging bot. This bot will sit on an IRC channel and output logs in github friendly Markdown (so you can post them to a repo and give people an easy way to read them).

Since it was just as easy to write a flexible bot than a single use bot, I thought others might be interest in it.


The bot isn’t fancy, but it does the job.

It only supports logging of a single channel per instance, but it will interface with a nickserv server to identify itself, and will log each day’s activity in a separate file (in nicely sortable YYYY-MM-DD.md format) in a directory per channel.

Fire it up in a screen on an always on machine and you should start collecting logs straight away. To create the logs for #knownchat, I turned it’s channel dir into a git repo, and periodically push on a cronjob, but you might find other ways of doing things.

To keep things quiet, it’ll only log chat, not channel messages (leave/join etc).

Hopefully someone else’ll find this useful!

» Visit the project on Github...


Just a quicky, but it caught me out.

I make use of Firefox’s sync server to synchronise bookmarks, passwords etc between computers, but because I do not like the idea of having this stored on a computer that I don’t control, I run my own version of the server on my own hardware.

This was working fine, however after a recent server upgrade syncing stopped working.

On investigation, I found that exceptions were being thrown by the WSGI process, the important part being:

I did a little bit of digging, and it seems that SSLv3 has been disabled because of the protocol’s vulnerability to the POODLE attack. However, it seems that some of the Python libraries just assume that support is going to be there.

The fix was to edit /path/to/syncserver/html/local/lib/python2.7/site-packages/requests/packages/urllib3/contrib/pyopenssl.py itself. Open the file, and go to line 62.

Change it from this:

To this:

Which removes the mapping (and support) for SSL v3.

Hope this helps!