Nerdy post here – sorry, no fun trip pictures this time.

The ability of the Linux webserver to simply look at a folder filled with files and then generate an index of them is one of its earliest and most elegant features. You are probably well used to seeing folders like this around the internet – that’s an example.

However, since around 2009 or so, I had been using a modified version of that made by a developer named Justin Hagstrom – you can see just how old his original “AutoIndex” PHP based system is because his site hasn’t changed much!

Last week I got an email from Google Domains alerting me that one of the Google Earth kmz/kml map files from biking and hiking trips that I host at https://heiseheise.com/files was unable to be indexed anymore – HTTP error 500, not found.

I don’t generally visit my own file server; why would I, I have the files on my computers already! But sure enough – the site was dead, not loading anything. My log files showed that it died somewhere in October 2023, which was about when I did a mandated PHP update on the webserver. Mandated in the sense that Ionos, my hosting company, told me that I’d be billed an extra $5 each month if I didn’t upgrade from PHP 7.4 to PHP 8.2, the current mainline support version.

This is to be expected I suppose – in a vacuum, we could keep using old versions of all software forever, but thanks to the Internet not being a vacuum, we’re in a neverending cycle of needing to upgrade to prevent security vulnerabilities (and add new features too I guess; but who needs those? Sure, we could glue generative AI garbage onto a terminal program – that’ll be popular, right? /sarcasm Seriously, security is necessary, unfortunately… new features are…. eh? I don’t really care).

Ah-hah, I thought – well, surely the PHP upgrade killed the /files system. Considering that as you can see from Justin’s link above, it was un-updated since 2007, I wasn’t entirely surprised. But now we have places like Github, so I immediately went on a mission to see if anyone had forked his old code. And they had! This one looked like the most full featured, so I simply dumped it in the /files subdirectory on my webserver and expected everything to be great. But it wasn’t. More 500 errors. What the heck?

I replicated it on my work server – same thing. I spoke with our Linux admin and he immediately pointed me towards this closed issue (which I commented on today) saying that, ah-hah, it doesn’t work with PHP 8 either, which is what both our work server and my personal server are on.

Sure enough, when I went to the rubo77 fork of AutoIndex PHP, and overwrote the BeitDina fork with its data – now everything works fine. I did have to clear out a bunch of random stuff that BeitDina emptied onto my webserver, as it seems like the developer has a bunch of new functionality planned for the site. Unfortunately, supporting PHP 8 is the #1 feature I needed right now, not new visual whizbangs!

Now /files is back up and running again, with a slightly new look, the ability to download the entire site as a .tar.gz compressed file, and calculate hashes in MD5 to confirm that data wasn’t modified or damaged during a download (useful for the .ISO files I host there perhaps). Hopefully this new version will last me another 15 years!