Geek Stuff


The site may go a bit wonky over the next few days as I am preparing to upgrade WordPress and Gallery2 again as well as the plugin that embeds Gallery2 within Wordpress. I’ve been putting this off for a while but figured I’d better just bite the bullet since some of the fixes are security related. I am backing everything including the databases up beforehand and this has gone smoothly in the past, but since our site uses a fair number of customizations and plugins, there’s always the potential for weirdness. If the site goes down for a bit, or just doesn’t look right, give me a few days to stomp out the bugs. :-)

Update 5:00 PM: The major upgrade seems to have gone without a hitch and I have all sorts of new Wordpress features to play with. ;-) There was a much upgraded version of the embedded Gallery2 plugin — if you scroll down and look at the sidebar you can now browse the album folders right from the main blog. I decided to wait for a major update to upgrade Gallery2 itself but I did finally go through the blog and replace all the pictures that were lost in the Typepad migration a couple of years ago; I had put them in a category called “fixpics” so I’d be able to find them easily, and I don’t know if that is the name of a software program of some sort, but I’ve been getting some weird site hits from ‘fixpics’ searches. I’m glad to have it gone and the broken links finally repaired.

By the way, I should probably put some sort of link up for this but if you want to see just the latest updates for the photo gallery you can chose “View Latest Updates” from the main Gallery page’s ‘Album actions’ menu and you can bookmark the resulting page. Go there today and you’ll see some neat pictures of our apple tree that bloomed last week.

OK, this is going to be another one of those posts that you might just want to skip over if you are not on the geeky side…

We’ve got a new computer (more on that later) and I am getting all the apps installed on it that I work with on a regular basis; somehow or another while trying to find the link for the Gallery Remote software I that I use to upload photos, I noticed on the home page of the critterweb.com site that the links at the upper right were broken. “Hmmmm…” I thought;  I knew they originally worked, but couldn’t remember if I ever tested them after that last upgrade.

A quick bit of testing (I noticed that the Gallery link worked, and the other links worked if I clicked on the Gallery link first) pointed in the direction of a bad URL. There was an extra directory level specified there that didn’t need to be, and so it was going to my 404 page which also appeared to be broken and was generating a nasty PHP error.

About a half hour of research on Google, the download of a text editor that highlights syntax in code, and some scrutiny of the page in that editor revealed an extra single quote where there should not be one. Simple enough — that fixed the 404 page.

Next I tackled the bad URL… I went into the Options page of WordPress without really thinking about what I was doing, and pulled the ‘extra’ directory out of my WordPress site URL. Even as I clicked the Update button, a warning bell went off that I had just committed a major ‘oops’ but it was already too late to take it back. I now had no way to re-edit that page, as the WP_Admin folder was now unresolvable, the style sheet and header files for the site were also missing resulting in a garbled mishmash of text, and on top of all that, my smart-ass 404 page — which basically says something to the effect that the page was not found because Chris is an idiot (which in this case was true I guess!) — now appeared at the top of the mess.

I poked through the site’s configuration files and there was no way to change the ’siteurl’ value there, some more research led me to instructions on how to change it directly in the MySQL database, which meant I had to hunt down my Control Panel login info because I hadn’t installed SQLYog on this machine yet. Once I got in (and did a precautionary SQL dump before getting my happy little fingers into the tables) it was easy to fix. The site was now back the way it should be… sort of. The problem was that I then I realized that an image link was broken on one of the previously unviewable pages, another undetected casualty of the upgrade last month, I am guessing.

So… some more time gets wasted hunting down another copy of the file in question and uploading it. Then I load the page and I still can’t see it. Huh. More poking around to isolate the reason for that and lo and behold: in the course of all this I discover that directory browsing is enabled on the site - ack! A security no-no. I fixed the image link but now it was back to Google to find out how to disable this… I remembered it was an .htaccess option but didn’t remember the exact syntax and no way I was going to screw up the entire site by editing my root .htaccess with a wild guess. Finally I found what I was looking for and made the change (it’s “Options -Indexes” without the quotes on a line by itself, for anyone who may find this post in the future looking for the same fix) and everything is back to normal. I think. Damned if I am going to look any further and find something else to screw up worse fix!

You know, I think I’ll finish loading the software another day and go mow the lawn, which seems like a much safer venture for the few brain cells that seem to be firing in my head today.

I just spent the better part of several hours backing up the two MySQL databases and all the files for this site, then updating all the software.  We are now running:

Yeah, I know it doesn’t look any different, at least it shouldn’t (please report any glitches to me!) but it added some useful functionality, fixed some security holes and bugs, and it seems to have resolved the slow-loading issue.

I also replaced one of the pictures in the collage that makes up the page banner, Olive the blinded bee-cat is now Olive the party cat. It’s a bit dark and gloomy, but then again so is Olive most of the time so I guess it’s more or less appropriate.

For anyone else who has noticed that the site is suddenly taking an extra long time — a good 30 seconds or so — to load, I thought I would mention that I aware of it and am researching the cause. It seems to be more noticable in Firefox than in IE, for whatever reason. I recently added a Petfinder ‘Featured Pet’ block to the sidebar and thought that might be the cause, but when I remove it, it doesn’t load any faster.

Anyway, I *am* aware of it and looking into the cause. When I get a chance I am going to upgrade Wordpress from 2.1 to 2.2 and see if that helps, but first I have to back everything up and make sure all my plugins are compatible with 2.2.

I have been suffering from one of my periodic bouts of insomnia this week; this time, it’s not a problem with getting to sleep, or waking up in the middle of the night, but rather I just sort of drift through the entire night without feeling like I was ever truly asleep.

Yesterday morning the alarm went off and I just sort of rolled over, thinking “ugh, I feel like crap and this day is going to suck.” I couldn’t quite bring myself to get up. I wasn’t really asleep — I was aware of Maggie shuffling around in her crate, the cats moving around the house — but I suppose I was not exactly awake, either, because I found myself carrying on a conversation with a pixel.

The pixel was a transparent rounded cartoon cube, with arms sticking out the sides of the cube and skinny little Jiminy Cricket-ish legs below, and he was floating in the air. He also had a goatee, and I think, bushy eyebrows. I don’t remember what he was saying but he had kind of a gruff, scratchy voice. It made perfect sense to me that he was one of those one-pixel transparent gifs that were used a lot in web design for spacing, before CSS came along, but then I guess somewhere along the way I realized I was talking to an imaginary cartoon pixel and that I was dreaming or halucinating. The pixel disappeared and I plodded off to the shower to clear the cobwebs out of my head.

Isn’t it strange what sort of nonsense your brain conjures up? If someone told me to describe what I thought a transparent pixel would look like, if it was a ‘person’, and I’d probably have come up with something rather pixie-ish and ethereal, not a grouchy plump cube. Where the devil did THAT come from?

Hmm…. I wonder if I did a Google Images search on ‘transparent.gif’ or ’spacer.gif’ (the names most commonly used for spacer gifs) if the results would be blank?

I was having some problems integrating the Gallery and the “DarkMaple” theme I was using so I have switched to a theme that has been optimized for the WPG2 embedded plugin, though for some reason the links at the top were misdirected and I wound up having to add an .htaccess redirect to make it work. In English, that means that you can now view the photos without leaving the main page, and then navigate back to that page without getting an ugly ‘page not found’ error. I do like the layout of this theme, with is called “Connections Reloaded” (and can be found here for those who are interested) very much, but its not a color palette I would normally have picked. Since I don’t have time to take apart DarkMaple and make it work right now, it’s what you are going to be seeing for a while :-)