Tag Archives: apache

Back home

I left my hotel in Moscow at about 0530 this morning, and got home at about 1730, which is 0130 Moscow time, making about 20 hours of travel time. I am really really (really) tired. There are roughly a zillion things that I want to write about. The last few days were amazingly cool, in what I saw, who I got to hang out with, and some of the conversations I had.

Meanwhile, you can see the rest of my photos. I had a Russian soldier say “Hi, Yankee” to me just outside of Red Square. 🙂

Right now, I’m going to get something to eat, then sleep a bit. Hopefully tomorrow I can unpack and get back into this timezone, as well as writing about some of the amazingly cool stuff that happened.

The Apache Way

I just got done giving my talk, and I don’t feel very good about it. Between starting very late, technical problems with the projector and a strange malfunctioning of my mouse during the talk, I got progressively more flustered, and I’m not sure I said quite what I wanted to say. There were still some good questions, and I think I did ok with them. But I feel kind of bad coming all this way and not doing my best.

More about Open Source Forum Russia

I have more details on the Open Source Forum Russia. It appears that the term “keynote” was a little inaccurate. I’m giving a regular conference session. Sorry for any exaggerated impression of my importance I may have given. Lest you think I am disappointed, this is actually an enormous relief. I was getting progressively more nervous about giving a plenary session. Yikes. Making a few remarks in a plenary session at ApacheCon is one thing, but a keynote?

The real keynotes are being given by Maddog Hall, Larry Wall, and Adam Jollans, among others.

There will be a driver waiting in the Moscow airport for me, with a sign with my name on it. I’ve *never* had that kind of vip treatment. I’m getting quite excited about this trip. I might even start packing soon. 😉

What I’m writing

Well, I’ve alluded to it a few times, so I might as well go ahead and say it.

I’m writing a mod_rewrite user handbook. I don’t have a title yet, but in my mind it’s called “mod_rewrite users handbook.” Clever title, hmm?

I’m writing for Apress, for a number of reasons. One, the editors there are *way* cool. Also, the editor that I’m working with is an author himself, as well as really seeming to know what sorts of questions people are asking in this arena. Also, other publishers that I asked about it didn’t really think that it was important enough to write a whole book about. Also, they questioned whether I could fill a whole book on this topic.

So, I’m about 3 chapters in, and hope to have something in print late this summer. I’m really quite excited about it, and I think it’s going to be a *great* book. Yeah, I know, that sounds a little conceited, but I feel very good about the book so far, and it just feels good.

Finally moved to 2.0

Well, after … I’m not sure how long … I’ve finally moved the last of my servers to Apache 2.0. The main thing that took so long was the sheer quantity of really icky mod_perl code that was 1.3 specific, accompanied by a great deal of inertia and laziness about updating it. So it’s all good now. Or at least, as far as I know.

I need to go to bed before I find any more problems with it. 🙂

Permalinks

WordPress comes with a nifty feature called Permalinks, whereby you can have links to your articles by name, rather than by the icky ID number.

I’ve never done that, because the rewrite rules necessary to make it happen are deeply inscrutable.

Well, since I’m monkeying with mod_rewrite stuff anyway, I thought that making a permalink thingy that I can actually understand would be a good example of a RewriteMap rule. So, here it is.

This is a first draft, and may have some problems. I already know one problem, and that is that RewriteMap can’t be used in .htaccess files. That’s not a problem for me, but it is a problem for a significant number of folks that use WordPress. The only way around that is to get your server admin to add a RewriteMap line to the main server config file, pointing at your map program. That problem may be insurmountable for some folks.

Anyways, in your config file, you put:

RewriteMap wp_permalinks prg:/somewhere/bin/wp_rewrite_map.pl
RewriteRule ^/perm/(.*) ${wp_permalinks:$1} [PT]

The file /somewhere/bin/wp_rewrite_map.pl looks like this:

#!/usr/bin/perl
use DBI;
$|=1;
my $dbh = DBI->connect(“DBI:mysql:wordpress:dbserver”, ‘username’, ‘password’);
my $sth = $dbh->prepare(“SELECT ID FROM wp_posts
WHERE post_name = ?”);
my $ID;

# Rewrite “permalink” style links to article IDs

while (my $post_name = <STDIN>) {
chomp $post_name;
$sth->execute($post_name);
$sth->bind_columns($ID);
$sth->fetch;

print “/wordpress/index.php?p=$IDn”;
}

This article, for example, has the URL of https://drbacchus.com/perm/permalinks

ApacheCon planning

With 214 responses to the ApacheCon RFP, about half of them coming in the last week, we’re gathering in NYC to select which ones will be in the show, as well as put together the schedule.

I discovered on Wednesday that even though I was badgering other people to submit talks, I myself had forgotten to submit any talks. Great. I managed to sneak a few in, though. 🙂

I really don’t like New York City. It is loud, too bright, crowded, and people just aren’t very nice. On the bright side, we’ll be so busy that we’re unlikely to get out of the hotel much. We’ll be on South William Street, wherever that is. Looks like there’s a few geocaches in the area, so maybe I’ll nip out one of the evenings and look for a couple of those. If it’s not too miserably cold.