Dan Lowe

Thoughts on life, the universe, and everything.

Mig (My Image Gallery)

Mig (or “My Image Gallery”) is a photo gallery program I wrote a few years ago. It was my first large PHP project.

I am no longer developing Mig. I have handed the reins over to a guy named Boris. However, I have a few thoughts about its disposition when it left my hands.

Mig has a few bad points. I was experienced with writing web-based programs, and with scripting in general (in Perl) at the time I wrote Mig, but since I was new to PHP I believe Mig suffered from my inexperience with the language. It has a few fundamental design problems which make adding certain features (and fixing certain bugs) difficult to pull off without breaking compatibility with existing behavior.

On the other hand, Mig has some advantages over other gallery programs. For one thing, it’s very template-driven, meaning it’s really easy to customize the look and feel of a Mig gallery. This is the number one thing I heard from Mig users, as far as the reason they used Mig rather than some other gallery program. And truth be told, when I first got into digital photography, I found that most programs were not very customizable; that’s what led me to write Mig in the first place.

Where Mig really suffers is in automation and ease of administration. It was designed by a Unix gearhead and it shows. It can’t automatically create thumbnails. You can’t manage image remarks via the web. There’s no facility for users to leave a comment when they view the gallery. All of this boils down to Mig’s fundamental security policy: act only in a read-only way. My thinking was that if the software never attempts to write to the filesystem, that would increase the security of the program overall, because the most that a successful attacker could get from it was reading data. To ensure that wasn’t really a problem, I put in a small check to ensure that any read outside of the Mig album tree would cause a cataclysmic error and Mig is therefore reasonably secure (if not robust or feature-filled).

Is Mig something worth using? If what you want is utter simplicity and you don’t mind editing files on the command line (or uploading text files via FTP) to manage the site content, then Mig may be for you. If you want to do all this stuff via a snazzy web interface, then Mig probably isn’t your cup of tea.

Why am I not using Mig on my site anymore? Simple: I wanted the snazzy web interface, and didn’t have time to write it myself.

Mig home page