Back Again

Problem: For some reason, even though your PHP include_path does contain the location of your include file, PHP cannot seem to actually include() the file. The paths match exactly, and yet you still get errors.

Back on the air. I’ve been in the process of switching from my old QuickSilver G4 desktop to the new PowerBook, and when I took the old computer offline, I locked myself out of this blog. I actually run the editing client on my personal computer, but have a read-only version on the FreeBSD server that actually makes it public. So, when I took down the old computer, the site was still online, but not editable.

Getting the editing client running again was a fair amount of trouble. First there were all the code files to move over and into the right place. Then there was configuring Apache and PHP correctly. Then I needed to allow access to the database server from the new machine.

And then I got stuck. On the same problem that stuck me three years ago when I moved onto the QuickSilver: I could not include() in the code files for the blog. Or any files, for that matter.

Finally tracked down the problem, a teensy little thing, that I’m sure I’ll forget again by the time another three years goes by, and it’s time for the next new computer.

So, in the hopes that Google will find the answer when I try looking for it again:

Problem: For some reason, even though your PHP include_path does contain the location of your include file, PHP cannot seem to actually include() the file. The paths match exactly, and yet you still get errors.

Symptom: Trying to include() PHP code files into a main file results in errors like this:

Warning: main(include-file.inc): failed to open stream: No such file or directory in /path/to/main/file on line 18
Warning: main(): Failed opening ‘include-file.inc’ for inclusion (include_path=’.:/Users/username/Library/WebServer/…:/Library/WebServer/…’) in /Users/username/Sites/blog on line 18

Answer: You are keeping the include files in a location inside your own home directory (~/Library/... here). The permissons on ~/Library are no access for group and world. So the web server process cannot access them — even though the actual include directory has correct permissions.

Resolution: chmod go+rx ~/Library

New RSS 2.0 Syndication Feed

This weekend I spent a few hours writing a script to provide an updated RSS syndication feed, conforming to the RSS 2.0 specification. It adds publication times and categories to the items in the feed, which might make it a little more informative in your news aggregator. If you’re subscribing to this weblog, please update your subscription to use the new feed.

This weekend I spent a few hours writing a script to provide an updated RSS syndication feed, conforming to the RSS 2.0 specification. This is basically an upgrade to the RSS 0.91 spec, which adds some additional metadata. In particular, it adds publication times and categories to the items in the feed, which might make it a little more informative in your news aggregator (it does in NetNewsWire).

So, if you’re actually subscribing to this weblog, please update your subscription to use the new feed. The old one continues to work, but the new one is better.

Improvements for This Weblog

My biggest requests for improvements to this weblog.

So after using this weblogging software for a few months now, I have a list of things I’d like to see added to it:

  • Graphics management, and easy insertion of graphics into stories
  • Better, more automatic ways to refer to previous stories
  • More complete logging of page views, click-throughs, etc.

Are there things you (my many readers, ha) would like to see done differently on this weblog? Send me e-mail, at the address in the sidebar.

Don’t just say “post more,” either. I want that, too…

Bit Me!

Yes, it’s already happened, my ass has been bitten.

Ha! Well, it happened already. (My one-line modification coming back to bite me in the ass, that is)

I just added the date information to the end of each story, and it’s not quite right. Close enough, though, I’ll just work around the corner cases…

Sorting, Part Two

I figured something out.

OK, I figured something out to get the sorting behavior to be what I want (this item should appear above the first sorting story).

It’s not truly correct behavior, but it’s close, and it was a one-line change, which was a lot better than doing it the “right” way.

Which, of course, means that this will come back to bite me in the ass.

Sorting of Multiple Stories…

Why this weblog sorts stories funny.

A couple weeks ago I complained that the weblog software I’m using is doing something funny when sorting stories. Each day is sorted correctly, from most recent to least. But when a day has multiple stories, the stories are ordered the opposite, from oldest to youngest.

When I complained, I also vowed to fix. Unfortunately, in digging into the code that runs the site, that’s kind of hard, because only the publication date is being stored, i.e., there’s no time information to sort on.

So now instead of modifying a simple SQL statement, I will actually have to go in and modify the database, and hack at the application logic to keep some time information.

Probably more trouble than it’s worth. I’ll look for a shortcut.