I posted a rant about my hosting provider about 10 days ago. As I mentioned in the post, I quickly got the site up and running again. Pretty soon after that I was at the UKOUG conference and Cary Millsap‘s training course, so I never really got time to look at things again…
On Thursday evening I took a proper look at the site and OMG, what a mess. Here are some of the issues I’ve been firefighting since Thursday…
- Some images had been lost during the move. I managed to recovery them from a filesystem backup.
- The version of PHP had changed and the error_log was full of warnings. If seems some of my PHP was not ideal, but it had never presented a problem before. Most of the things were little and fixed quickly once I had found them. In my defense, some of the code was many years old. 🙂
- Some of the PHP configuration settings had changed, making my back-end code react differently.
The last issue was the big one. Many moons ago I wrote my own custom CMS using PHP and mySQL to manage the site. Most of the site is flat files, but the content of the database is the single point of truth for me. Once I make a change, the flat page(s) are regenerated to reflect the change. The problem was my CMS was screwed. It’s fixed now, but a significant number of pages in the database contain some logical corruption. This doesn’t affect what people see on the site, it just means the database is no longer the single point of truth.
I’ve written some tools to help me fix the data in the database, but I’m not willing to let them roam free. I’m using them to work through the pages one at a time. It’s very labor intensive, but it’s the safest option.
Two bonuses of this whole fiasco are:
- I’ve got to revamp some of the terrible HTML I used back in the day.
- I noticed how many of my images are being hot-linked by people. All their requests for the missing images showed up as errors in my error log. This is what alerted me to the missing images in the first place. So not only are these people stealing my content, but they are too lazy to actually copy the images and are using my bandwidth to serve their articles. I’ve put a stop to that. See preventing hot-linking. I’ve allowed Google and Orana.info to continue hot-linking for obvious reasons.
I was speaking to someone in Bulgaria about the site and mentioned that every year it gets bigger and the time I spend maintaining it, rather than writing new content, increases. This just goes to prove it.
So it looks like the next few days are going to be very busy and very boring. 🙁