talideon.com

You’ve got to change the world and use this chance to be heard!

June 14, 2006 at 6:56AM I give up! For now anyway

I spent the whole evening integrating my new Shimubi weblog system (which is quite, quite sexy) into the rest of the site, reworking the existing templates, redesigning a few bits and pieces, &c., so that I’d--in theory--be able to fire everything online and have no-one know the better (aside from some visual improvements and the like).

Or maybe not.

This server runs an ancient version of MySQL, 4.1.0-alpha. Yes, alpha. Despite the protestations of some, that string is hardwired into the binaries so if it says “MySQL 4.1.0-alpha”, you tried upgrading it and it still says “MySQL 4.1.0-alpha”, that’s precisely what you’re running. Now, there’s a good reason why this was installed on the server: there was a project that needed the extra bits and bobs MySQL 4.1.0 had, and only the alpha was available at the time. But it should really be upgraded to 4.1.20 at this point.

But I digress. Even MySQL 4.1.0-alpha’s meant to be able to cope with Unicode properly (problems with the PHP MySQL drivers cope with UTF-8 notwithstanding). So I tried setting up the new tables, starting with:

CREATE TABLE shibumi_comments (
    id       INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
    entry_id INTEGER UNSIGNED NOT NULL,
    posted   DATETIME         NOT NULL,
    poster   VARCHAR(64)      NOT NULL,
    email    VARCHAR(64)      NOT NULL,
    homepage VARCHAR(255)     NOT NULL,
    body     TEXT             NOT NULL,

    PRIMARY KEY (id),
    KEY entry (entry_id, email(4))
) CHARACTER SET utf8 TYPE=MyISAM;

All peachy, you’d think. But no. Here’s the error I got: Unknown character set: ‘utf8’. WTF?!

So I tried SHOW CHARACTER SET and in contradiction to the error above, it lists UTF-8 as a perfectly valid character set.

So, what can I do? I’d love if I could convince one of the lads to either move me over to DCWEB2, but though that would gain me ColdFusion 6 and a stable, working version of MySQL, it’d probably lose me PHP, which I need for the ping proxy. Alternatively, somebody some evening could back up the existing databases on DCWEB1, uninstall MySQL, download and install a clean version of MySQL 4.1.20, and check the connections to make sure they work.

Two nasty alternatives remain: Use the binary character set, or see if I can use the PHP/MySQL/UTF-8 trick by treating anything I read from or write to the database as opaque binary data and leave the tables as Latin-1. Knowing my luck, CF5 attempts to be clever and silently converts UTF-8 to Latin-1.

Sigh.

Technorati Search Technorati Search Irish Bloggers

Comments

1 On June 14, 2006 at 23:49, Topper wrote:

Sheesh. I’ll move yer site to DCWeb2. When’s a good time?

2 On June 15, 2006 at 0:26, Keith wrote:

Any time’s fine with me. Just two things: is PHP running on it? Just wondering because I need it for this; and could you make an account for me for MySQL so that I can stop using CFMyAdmin? Having it running here makes me feel a wee bit uncomfortable as it’s a bit of a security hole considering everything.

There will be much beer bought for you next time I’m down in Cork!

Post a comment

All form information is optional, but it’s a good idea to fill in your name and email address if you want me to take your comment seriously.

Spammers, don’t bother posting crap down here. The site is set up so that legitimate search engines (Google, for instance) won’t index pages with comments on them. Posting crud here only means you’re wasting my time and patience. Shoo!

Real names, please. Please include!
Won’t be displayed. Please include!
Displayed, if present.