Categories
Uncategorized

Comment Spam

Finally the spammers have found me. I’ve got about 30 comment spams in my moderation queue this morning. Good job I enabled the moderation in the first place…

Anyway, to help with sorting it all out, I wrote a <a href="javascript:(function(){var _1=document.getElementById('comments').getElementsByTagName('input');for(var i=0;idelete comment spam bookmarklet. If you run it on the wordpress comment moderation page, then you will set the action for every comment to be delete by default. If you get almost no comments, like me, then this is probably a worthwhile default action.

I know it’s not a perfect bookmarklet. It will stick an error into your JavaScript console when you run it on any other page. But it works well enough for now.

Categories
Uncategorized

Blog Outage, Blame PHP

My blog hasn’t been up and running for the last 24 hours or so. This is because I foolishly decided to upgrade to PHP5. After playing “guess which extensions wordpress-pg needs,” I then got served up a lovely blank page.

But what’s really annoying is that there was no indication at all of anything going wrong in the error log. Or on the browser. Just nothingness. After inserting lots and lots of debug “echo” statements (thankfully I know enough PHP to do that), I eventually tracked the point of stoppage down to a call to pg_fetch_object(). Close inspection of the manual revealed that it had changed how it was called between version 4 and 5. Great backwards compatibility, guys! Removing the last parameter enabled me to get going again though. I just wish I had been able to see an error.

Categories
Uncategorized

wordpress & backslashes

One of my pet peeves about wordpress is that because it’s based on PHP and MySQL it doesn’t like backslash characters at all. It just eats them up and screws up your post. But I’ve found a simple answer. Use numeric entities instead. Just type in \ or \ to get a nice \backslash.

Categories
Uncategorized

PostgreSQL Upgrade

I’ve just upgraded to PostgreSQL 8.0, which as expected, didn’t go entirely smoothly. The config file format has changed a bit, although ediff soon took care of that. The dump-and-restore rigmarole is still there, but then that’s what nightly backups are for.

The main trouble was that I had been playing with SSL certificates some time ago and that’s changed a little bit in 8.0 (hopefully due to my prompting). Turning that off made things go better. It’s not a problem because the new default is to listen to the localhost interface only instead of all IP addresses.

What’s nice is that wordpress-pg appears to work without any problems. I wasn’t expecting any, but it’s always pleasant when it works out like that.

Anyway, now that it’s there, I can start playing with it to see what’s changed. Even though I don’t use the database much at home, it’s all good experience.

Categories
Uncategorized

Migration

I need to migrate the old web site over to wordpress. There’s a lot to change though and I need to make sure that it goes (relatively) smoothly. I don’t want to end up with too many 404s.

Stuff that needs thinking about:

  • favicon. I probably should import into the blog bits, maybe under wp-content?
  • Staged. This blog should be accessible at happygiraffe.net/blog until all content is migrated.
  • /dist needs to be separated out; I don’t want to make it part of this blog.
  • /books, /comics and /scripts all need a damned great makeover. Dunno how yet.

I think it’s important to get the old content migrated before I put this in place. On the other hand, looking at the logs makes me realise that there really aren’t that many hits for a lot of it. My most popular article How To Copy Files Across A Network has had only 5560 hits in the last year. Still, migrating the articles isn’t hard and I should probably give that a go first.

Categories
Uncategorized

Old Content

I have lots of content from my old site which needs to be brought in to the new blog. I’ll start adding it as new posts and add redirects on the old locations so that they still work.

Thankfully, this should be fairly easy as it’s all XHTML content to begin with. The only difficulty will be the lists of books and comix. I’ll worry about those later.

Categories
Uncategorized

Hello World

It’s time to start using this site for something useful. I’ve used wordpress at work for a while, and it seems like it could be useful here too. It’s a lot easier than the previous setup of cvs+xslt+make.

I’ve decided on wordpress-pg since I don’t have MySQL installed and didn’t understand it when I tried. PostgreSQL works well and feels a lot simpler to me. Plus it doesn’t involve threads, which is always a bonus. Disturbingly, the images in the tarball appeared corrupted, I’ll have to let them know. I’m still keeping the wordpress-pg code in subversion, but the data is safely stored in a database where it belongs.

What sort of content goes here? Well, it’s likely to be mostly technical since that’s a large part of me. But hopefully I’ll get some cycling in too.

Anyway, on with the writing…