Mar 262005
 

I decided I finally wanted to track down why I could­n’t get the thumb­nails work­ing on Word­Press. I always get the mes­sage “File type not sup­por­ted. Thumb­nail not cre­ated.” even when the file­type is sup­por­ted. I run a stand­ard Debi­an stable sys­tem, with a back­port of MySQL, so my first assump­tion was that it should work. A long week­end is a good chance to try to track down these things, espe­cially when it’s rain­ing as much as it is this week­end in Van­couver. Of course, I start at the Word­Press sup­port for­ums. This leads me to try apt-get install libgd2; the thumb­nails don’t work. As a next approx­im­a­tion, try apt-get install php4-gd2; this also does­n’t work.

I dig a bit deep­er in the for­ums and find that a new­er ver­sion of PHP might solve the prob­lem; the Debi­an stable ver­sion is 4.1.2 and a ver­sion > 4.3 is recom­men­ded as the GD lib­rary is included by default. The oth­er advant­age to upgrad­ing PHP4 is that there are quite a few secur­ity holes fixed in ver­sion 4.3.9 and up; these may have been back­por­ted to 4.1.2, of course. So I look in backports.org because I already know how to use those; no new­er ver­sion of php4 there. Next I try dotdeb.org; this back­port site has a new­er ver­sion of PHP4 and a new­er ver­sion of MySQL. I add the magic line deb http://packages.dotdeb.org ./ to the /etc/apt/sources.list file. I also change the pin pri­or­ity in the pref­er­ences file to use dotdeb.org rather than backports.org. This upgrades my MySQL to dot­de­b’s 4.0 ver­sion nicely, but does­n’t touch the PHP4 install­a­tion. Seems odd to me since they should both be upgraded in the same way, I would have thought. Edd Dum­bill (Debi­an guru) gives me a couple of oth­er things to try in the pref­er­ences file; noth­ing seems cap­able of rais­ing the pri­or­ity of the dot­deb php4 install over the cur­rent stable installed ver­sion. Edd sug­gests installing each .deb by brute force; that breaks on unmet dependencies.

So I think about installing the unstable ver­sion of PHP4; maybe that will work bet­ter. I set up the pin pri­or­it­ies in the preferences file, and use apt-get -t unstable install php4. It threatens to install lots of things, so I decide to install a little at a time and make sure noth­ing breaks, or at least ensure I know what has broken if it does. First off, I make backups of httpd.conf, access.conf, the fire­wall script, and the PPPOE set­tings. Just in case. Not that I’m para­noid or anything.

  1. I install the unstable ver­sion of libexpat1; this installs libc6 and talks about hav­ing to restart the X11 serv­er. Since I’m not run­ning X, this isn’t a prob­lem. Then it decides it also needs to restart apache but the restart fails so I have to start apache by hand. For a while it looks like that failed too and I’m men­tally curs­ing but it does even­tu­ally restart.
  2. Then I decide, rather than the piece­meal approach, to do the full install with apt-get -t unstable install php4. As a side-effect it looks like I also get perl updated to 5.8.4, and it upgrades apache (just as well I saved those conf files!). The install script tells me about changes to apache con­fig files, which has me a little wor­ried… I decide to install the pack­age main­tain­er­’s ver­sion of httpd.conf and add in any needed changes later. Everything seems to keep on run­ning after­wards, though, so this upgrade was bet­ter than the last dist-upgrade I did, which did­n’t apply my changes to httpd.conf.

Now phpinfo.php shows that I have php4.3.10 installed on my sys­tem; time to try out the thumb­nail func­tion­al­ity. It still does­n’t work. Rein­stall php4-gd2. Thumb­nails still don’t work. Try apt-get -t unstable install php4-gd, which also seems to uninstall/reinstall/install a whole bunch of pack­ages. I con­sole myself that I’m half-way to sarge, if and when that ver­sion of Debi­an ever makes it to stable. Hmm, the install script just asked me what size paper should be the default on my sys­tem. I guess it has some reas­on for want­ing to know.

Since the thumb­nail gen­er­a­tion still does­n’t work, and I have no idea what to try next, I decide to give up and post on the Word­Press sup­port for­um. I hope someone there knows what the prob­lem might be! In the mean­time I cre­ate the thumb­nail I need using Imagema­gick­’s convert func­tion. This takes one com­mand line and approx­im­ately 0.01 seconds.

Later… on the Word­Press sup­port for­um someone tells me to search the for­ums. Since I’d star­ted by doing that (and quoted for­um searches in my post), that was­n’t par­tic­u­larly help­ful. Then I remem­ber I have SpamKarma installed, which has a captcha script (not that I want to use it, but it should be a good test). The error mes­sage on the captcha test page says the GD lib­rary isn’t enabled. A bit of Googling turns up the idea that maybe I need to restart apache yet again. I had­n’t thought of this before because the Debi­an upgrade/install pro­cess usu­ally restarts everything that needs to be restar­ted, includ­ing apache. I run apachectl restart and find I can finally click the magic but­ton on image upload to cre­ate thumbnails!

So the les­son appears to be: if in doubt, restart apache. Three times, prefer­ably. Any less just may not work.

Inspiration 5443

 Crafts  Comments Off on Inspiration 5443
Mar 262005
 

I’ve been knit­ting for most of my life, except for a long gap in the 1990s. I took it up again about 3 years ago and, due in no little part to Eve’s encour­age­ment, am going to start show­ing off some of what I’ve done and am doing. Maybe blog­ging will even encour­age me to fin­ish things soon­er — I tend to do most of a piece but not get around to fin­ish­ing it for some time.

my version of 5443 pattern view of 5443 All that being said, here’s my first blog entry on the sub­ject of crafts, my ver­sion of item 5443 in a pat­tern book called Inspir­a­tion 75. One would think that a book that calls itself “inspir­a­tion” could come up with inspired names for the pat­terns with­in it, rather than just num­bers. In the book the top looks like the image on the left (note the link leads to an online retail­er for the pat­tern books and yarn; I have no idea wheth­er they’re any good or not but they did have all the images). Instead of the recom­men­ded yarn, I used Schoeller­’s Micro-Cablé in col­our 23 (yet anoth­er unin­spired name). The link there is to Wise Needle, a great site if you want to fig­ure out which yarns to sub­sti­tute for that hard-to-find yarn from Europe. Tim took the photo of the res­ults on a mini-golf course in Maui, hence the “shot on loc­a­tion” look. 

/* ]]> */