December 2005 Archives
As I mentioned last night, I had to restore some database files. Unfortunately the backup I'd downloaded was in a tarred/gzip file with each database table represented by three files with the extensions frm, myd and myi. After googling a bit (dear Google: please don't bother giving me "Supplemental result" listings if the target page is gone and you don't have a cache copy of it. That's just dumb.) I found that these were raw SQL database files.
The only way to restore them is appeared to be to copy them directly to MySQL's data directory - the problem being that I didn't actually have access to the MySQL data directory on the web server in question. You would think, given that phpMyAdmin had given me these files as a backup that it would have an easy way to restore them, but if it does, I couldn't find it.
The solution ended up being:
- Install MySQL and MySQL Administrator on my home PC.
- Copy the appropriate table files to the MySQL data directory.
- Use MySQL Administrator to make a backup in SQL format.
- Use the SQL script from the backup to restore the table on the web site.
Once the tables were restored, I used a couple of SQL statements to copy the data across to the appropriate table, and all was hunky dory.
Some things were still broken after I did yesterday's upgrade, so I took a look tonight. Some of the fixes were easy, because they were things missing from the style template which were necessary for the new version. They'd turned up to have changed the default sort order on the story lists, which was easily fixed.
However two things weren't easily fixed: the chapter titles were gone (I presume this was a bug in the upgrade script) and the stories no longer had hit counters on them (they've been removed from the program for some unfathomable reason). Fortunately I had backups of the database, so I reimplemented hit counters, then restored the appropriate table under a new name and copied the appropriate values across.
The last step took a lot longer than it should have, for various reasons.
It was a lot of work, but hopefully people should be happier.
Tonight I spent upgrading A Teaspoon and an Open Mind to eFiction 2, because I found a post on the eFiction forum indicating that there were security holes in 1.1 which could allow people to view other user's passwords.
Looking at my previous entries on eFiction (keep in mind I'm only studying the code briefly here):
- Fixing the Teaspoon - The disappearing help text appears to be fixed in this version, but I can't tell whether they've implemented anything to fix Mac posting.
- eFiction sucks part 2 - I don't see any error handling for when the database is down, or when the story file is unable to be written.
Another thing I fixed a while back was the javascript on the "add story" page. There are two methods of uploading a story: write it in a textarea, or upload it as a text or html file. If you select the textarea, it disables uploading, and vice versa, but there's no way to switch, short of starting over.
At some point I will go back and reinsert my fixes... I'm sure the users will be kept busy by the many and varied new features the authors have added to the software in the meantime.
I cleaned my monitor earlier because the amount of dirt had been bugging me, only to discover that some of the dirt was not dirt at all. There are a number of fairly nasty scratches on the screen of my monitor. I'm not sure how they got there, but suspect that they might have been caused by me when I was putting the cover of my PC either on or off.
It's a CRT 19 inch ViewSonic monitor. Googling didn't help much, other than to instill a fear of imminent monitor implosion in me, so I may have to ask at stores tomorrow...
