Category Archives: Geek-Speak

Geeky spaces lie within — be careful where you step!

Mass Stupidity

$1.599

Well, it’s finally happened — I’ve attracted just enough attention that someone has tried posting a comment promoting a porn video site.

Strangely enough, it was on a three-week old post, but I think they were trying to see what they could get away with. It came from a hotmail account (allegedly), and from an IP address in the UK, pointing to a site that is registered in Spain. Guess they’ve got nothing better to do in Europe than spamming my site.

So, for now, I’ll leave comments open to all, but if this starts becoming a problem, don’t be surprised if I make a change so I have to approve comments before they appear.

However, I now have an IP to add to my banned list! 🙂

BlogShares

OK, a little strangeness this morning.

I look at Yahoo and Google every now and then to make sure the indexing is working. (BTW, it appears the fine folks at Google have decided the site is worthy of indexing — welcome y’all!) On Yahoo’s site, I found what looked like someone linking to me, so I figured I’d check it out. I guess that’s the advantage of being a small site — having time to see what others are doing with your name! 😉

So the site was BlogShares (my “page” is here) and it appears to be a fantasy-stock-trading-like site where websites are given (or maybe earn) faux stock to trade with other folks. I’ve been listed since November (apparently — although I never knew it) and my stock value is nearly worthless.

After reading some of the stuff on here, I’d agree!!!! 🙂

New Titles

Two days spent on bringing fancy titles to the site, and I think I finally got it nailed.

I saw an article on A List Apart concerning Dynamic Text Replacement, and it sounded very cool, and pretty straightforward.

After poking around on the WordPress support site (here), I discovered that a plug-in for this already existed. Off I was to Huddled Masses to get the Automatic Images for Headlines plugin. Looked like a slam-dunk, and I thought I would be running this on Sunday. Not so…..

Here’s what it took to finally get it all working. What a path!

I plopped the plugin where it was supposed to go, configured a few variables it needed, and tried to run with it. Everytime it loaded a page, the page would stop at the first substituted title. After putting some echoes in the code, I discovered it was stopping when trying to run ImageTTFBBox. For some reason, PHP was dying in that routine, with no errors and no advancement beyond that point.

I looked up that function at php.net, and noticed it required the GD library and FreeType library. I didn’t think I had them, and found somewhere that there was gd functionality included, but I had to compile with an option flag turned on. Since I was gonna have to recompile anyway, I figured I would also upgrade PHP to 4.3.8 along the way.

I pulled down PHP 4.3.8, gunzipped, untarred it and then:

./configure --with -apxs2=/www/apache/current/bin/apxs --with-mysql --enable-exif --with-gd

Configure complained that zlib was required. I thought it looked like SuSE had installed zlib 1.1.4-225, but I couldn’t find it on the path, so I got 1.2.1 down from gzip.org. I did the standard dance (./configure, make, make install) and then recompiled PHP 4.3.8:

./configure --with -apxs2=/www/apache/current/bin/apxs --with-mysql --enable-exif --with-zlib=/usr/local/include/zlib.h --with-gd

That got me a little farther, but I still got an error cannot find libz
found on topology.org to configure zlib with:

./configure --prefix=/usr

Did make and make install, and tried to configure php without the with-zlib option. It failed again requiring zlib, so I re-configured PHP with:

./configure --with -apxs2=/www/apache/current/bin/apxs --with-mysql --enable-exif --with-zlib=/usr/lib --with-gd

This still failed, so I tried:

./configure --with -apxs2=/www/apache/current/bin/apxs --with-mysql --enable-exif --with-zlib=/usr/lib/libz.a --with-gd

This still failed, complaining that:

checking if the location of ZLIB install directory is defined... no
configure: error: Cannot find libz

I then tried compiling zlib:

./configure --prefix=/usr/local
make
make install

And then reconfigured PHP:

./configure --with -apxs2=/www/apache/current/bin/apxs --with-mysql --enable-exif --with-zlib=/usr/local --with-gd

This configure worked! Did a make and make install. Checked php –version and it shows 4.3.8 — good!

The next question was did WordPress still work? Well, after a cold stop and restart of Apache (graceful did not work, for some reason — not quite sure why), I was able to hit my pages.

However, the headlines show with problems, but at least I’m not getting “server does not support PHP image generation” messages on my pages. Obviously, I still had some kind of problem with the libraries for PHP.

I found somewhere that someone else had trod down this path, so I duped their work in my PHP configure:

./configure --with -apxs2=/www/apache/current/bin/apxs --with-mysql --enable-exif --with-zlib=/usr/local --with-gd --with-jpeg --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/lib

I still didn’t get my pretty headlines, so I figured I would start from scratch, inspired by some info once again from php.net. I grabbed jpeg v6, gd 2.0.28 and freetype 2.1.9 from their respective locations on the net.

Did the standard stuff to jpeg v6 and freetype: ./configure, make, make install. For gd, I did the following:

./configure --with-jpeg=/usr/local --with-freetype=/usr/local --with-png=/usr/local
make
make install

Then I reconfiged php 4.3.8 with:

./configure --with -apxs2=/www/apache/current/bin/apxs --with-mysql --enable-exif --with-zlib=/usr/local --with-gd --with-jpeg --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/lib

Alas, there were still no pretty headlines. Something somewhere implied that xpm needed to be included in my configuration of PHP, so I pulled down xpm 3.4. As seen elsewhere, I did the typical stuff (./configure, make, make install) and moved the directory with the goodies to /usr/local/xpm.

I needed to reconfigure gd with xpm, so;

./configure --with-jpeg=/usr/local --with-freetype=/usr/local --with-png=/usr/local --with-xpm=/usr/local
make
make install

Now, I needed to reconfig php:

./configure --with-apxs2=/www/apache/current/bin/apxs --with-mysql --enable-exif --with-zlib-dir=/usr/local --with-gd --with-jpeg=/usr/local --with-jpeg-dir=/usr/local --with-png=/usr/local --with-png-dir=/usr/local --with-xml --enable-track-vars --with-tiff-dir=/usr/lib --with-freetype=/usr/local --with-freetype-dir=/usr/local --with-xpm=/usr/local --with-xpm-dir=/usr/local
make
make install

WOOHOO!!!! It finally works!

Now to play with fonts and colors -- mind the dust!

Ray Tracing

Noticed on someone else’s blog that the 10th anniversary of ray-tracing is being celebrated with a contest. I remember ray-tracing from way-back, but hadn’t thought about it in a while.

Here are some of the images from their hall of fame — unbelievable! I’d love to be able to create stuff like that, but my eye is more toward images through my lens, rather than through my mind’s eye.

Weather

I’d been wanting to add a current weather conditions piece to the blog, as I’ve always had a facination for weather events. I’d seen other sites display it, so I figured there was some way to do it.

While looking for something else on the WordPress support site, I stumbled upon a Weather Hack by Jeremiah (code is here). This was dirt-easy to implement, and really works well.

I also noticed another post by robertswift to cache the data automatically using a cron job, so grabbed the code from his site, and set up the cron job to get the weather once every 15 minutes. Nice piece of work.

All this, plus loads of other information on Weather Hack, can be found at the WordPress support site page here.

Enjoy the weather we’re enjoying, and let me know if there’s other goodies you see out on the wild, wild web that you’d like to see here.

New Gear: Garmin GPSmap 60CS

Garmin GPSmap 60CS

I’d been thinking about a GPS for a while, with the goal of geocaching, and finding (hopefully) another path for some exercise.

After looking around, I finally settled on the Garmin 60CS. Why? Well, I don’t know that there’s a definitive answer. It’s got a TFT color screen, a real quadfiliar antenna (instead of a patch antenna), and features specific for geocaching. Add to this a USB interface, ability to have external power and antenna, and suddenly, this thing starts to look really good.

I put it in Smokey (the TrailBlazer), and tracked my journeys today. With it just sitting in the cupholder, it easily saw enough satellites to keep my journey intact and with reasonable resolution. Fun, fun, fun.

It has more bells and whistles than I can master quickly, but I think I’ll have fun trying. This little beast is nice!

Posting from Afar

It looks like I’ve got the posting by e-mail functionality working. Not a big deal to the readers, but a huge deal to me!

Now, I can post while “on the road” from regular mail clients anywhere. Cool, eh?

Basically, I used the default functionality, but heard about a module at John Blade’s Homepage that would help with cleanup of tags, etc. I’ve been able to get it to work, with a few mods.

One was to fix the timestamp that was being used by wp-mail.php — well documented on John’s site, and easy.

The second was to make a change to class-pop3.php to cut down on the number of error messages in my mail log — not documented, and a bit more arcane. This was in the noop functionality. Apparently, my mail server doesn’t like noops, so I nested the noop sending in an if to prevent sending it if the server was RFC1939 compliant. I think the logic is wrong where RFC1939 is being set, but it works, so I’m living with it.

The third was in wp-mail.php also, and involved changing the die that takes place when there are no messages for the wp e-mail account. When the die occurred, I got I/O error flushing output to client and -ERR POP EOF or I/O Error messages in my mail log. I changed
that to actually call the quit function in class-pop3.php instead, so that the disconnect was clean.

More coolness!

(BTW, there are real good instructions on how to set this functionality up at the WordPress Wiki.)

More Enhancements

My biggest fan — my grandmother — commented a couple of days ago that she’d like to know more info about the photos that appear in the header. (BTW, they are clickable to get a larger version of the picture.) I thought that was a great idea, and so I’ve implemented it.

To see the info on one of the pictures in the header, put your mouse pointer over it, and wait just a second. In the browsers I’ve tested, you will get either the alt or title information from the img tag, and it will tell you a little bit about the photo.

Thanks for the suggestion!

OK, So I’m a Dufus!

$1.749

Well, in my quest to bring the site a nice facelift, and hopefully some new functionality, I’ve discovered that I boofed things pretty good.

Over the weekend, I added all kinds of new functionality centered around the display of photos in the header and as icons for the Today’s Photos pieces. I also spent a ton of time last night working on the CSS to display in a multi-columnar fashion, and trying to overcome quirks between the behavior of MSIE and Firefox.

And I kept wondering why I’d had no comments about all the changes.

What I hadn’t noticed was that the functionality for leaving comments had somehow escaped the template for the main pages.

Darla noticed this last night, told me about it, and I finally had the opportunity to check it out tonight. Sure ’nuff, she was right — it was impossible to comment on the site. D’oh! Fortunately, I’d been saving this template before making big changes to it, and had a copy that had the right code in it. I copied that chunk back into the template, and am hoping for the best.

Sheesh!