Nov 012006
 

The mov­ing went rel­at­ively pain­lessly, although I should really have waited until the DNS move had taken effect before killing my DYNDNS account, since that meant the site was out of com­mis­sion for a little longer than abso­lutely neces­sary. Mind you, that was prob­ably all of two hours, so not a big deal. Everything should now work again as before.

The quick ver­sion of the steps I took to move Any­way:

  1. copy all the Word­Press files and rel­ev­ant plu­gin files to the new ISP site
  2. clean up the MySQL data­base as much as pos­sible to cut down on size; mostly delet­ing SpamKarma logs and old com­ment spam
  3. deac­tiv­ate all the plu­gins except the spam fighter
  4. export the MySQL data­base to SQL state­ments (I use phpmy­ad­min for this)
  5. import the MySQL data­base to the MySQL data­base set up on the new ISP
  6. make sure the config.php file has the right con­fig­ur­a­tion settings
  7. noti­fy the domain regis­trar of the new DNS settings
  8. delete the rel­ev­ant part of the dyndns account (that could have been done later)
  9. wait
  10. once host laurenwood.org shows the new DNS has taken effect, run the Word­Press upgrade script
  11. turn on the oth­er plugins
  12. run xenu to check for any broken links

My web site does seem faster now, and my web surf­ing is no longer com­pet­ing with the spam com­ments for band­width, so I’d say it’s a win all around.

Nov 012006
 

Our PC in the base­ment is get­ting over­loaded with my site (spam attacks are on the increase), so I’m mov­ing Any­way to a host­ing ser­vice. It will prob­ably take a day or two to get the wrinkles ironed out and the DNS rout­ing hooked up prop­erly; I’ll post again when it’s all set.

May 222006
 

I’ve been prom­ising to upgrade to Word­Press 2.0.2 for some time, and being on preg­nancy leave seemed to be the right time to do it (up early in the morn­ings, no press­ing work-related pro­jects). As usu­al, the actu­al pro­cess of upgrad­ing was simple and mostly just worked; I use WS-FTP Pro to trans­fer files and it tends to kill the per­mis­sions but a couple of minutes with chmod soon fixed that. Of course it took longer to backup the old files from the 1.5.2 install­a­tion first than to upgrade, for which I am grate­ful. Please let me know of any prob­lems; I don’t expect any, but you nev­er know.

Changes:

  • The image upload sys­tem now appears a little more stream­lined and has more options. I’ll find out more about how it works next time I try it out.
  • I activ­ated the data­base backup plu­gin, since I’ve been using phpmy­ad­min up till now and mak­ing it easi­er might mean I backup a little more often
  • I’m try­ing out the Slim­Stat plu­gin to give me some idea of what people are read­ing on my site. I hope this one does­n’t clog up the data­base too much, oth­er­wise (as happened with a pre­vi­ous stats plu­gin I tried) I’ll have to unin­stall it.

Next step: upgrad­ing the Atom 0.3 feed to Atom 1.0.

Jan 032006
 

Ive been intend­ing on upgrad­ing my Debi­an firewall/blog box to the latest ver­sion, called ‘sarge’ (a.k.a 3.1) for some months now. Today was the day I decided to finally bite the bul­let. Since I’ve been using back­ports of unstable ver­sions of soft­ware, such as MySQL (see Upgrad­ing MySQL on Debi­an for that pro­cess, and Enabling Thumb­nails for the pro­cess to upgrade libgd) I figured this could be a little trick­i­er than I really like, and I should be pre­pared. Here’s the his­tor­ic­al record of actu­ally get­ting it run­ning. YMMV, of course!

First, the doc­u­ment­a­tion on the Debi­an web site is good. The upgrad­ing instruc­tions are writ­ten per hard­ware plat­form and seem com­plete. I star­ted, as recom­men­ded in Upgrad­ing your Woody sys­tem by repla­cing the word “stable” in the /etc/apt/sources.list file with the word “woody” and then check­ing I had woody’s ver­sion of aptitude installed.

After copy­ing the recom­men­ded files to a safe loc­a­tion (that’s a lot of files!), I deleted the /etc/preferences file after sav­ing a copy — this is the file that says which ver­sions of any soft­ware to use. Since to begin with I want to use a clean, stand­ard Debi­an sarge dis­tri­bu­tion, I don’t need this file. Then it was on to sec­tion 4.2.2, “Check­ing pack­ages status”. I found that apt-get showed no holds, but aptitude showed that php4 was on hold (I can­’t ima­gine why). So I got rid of the hold.

After that, I just fol­lowed the steps, tak­ing the defaults mostly (since I did­n’t under­stand some of the ques­tions, that was an easy choice! One day I might under­stand what pango and defoma are all about, but in the mean­time I’ve decided not to both­er). There were a couple of mes­sages that mostly seemed ignor­able (note to self: upgrade exim3 to exim4 at some stage in the future) and all in all the pro­cess ran smoothly, if not par­tic­u­larly fast on my old, slow Pen­ti­um box. 

Time to check the res­ults — try my web site and find it’s been replaced by a gen­er­ic “wel­come to an Apache web site” mes­sage. The web serv­er has been magic­ally upgraded to Apache 2.0, which I had­n’t quite expec­ted or planned for. Oh well, time to hit the Apache documentation.

There’s a big dif­fer­ence between Debi­an upgrade doc­u­ment­a­tion and Apache upgrade doc­u­ment­a­tion. Where the Debi­an upgrade instruc­tions are exactly that (“Do this, then this. Run this com­mand and if you get this out­put, do this, oth­er­wise do that”), the Apache doc­u­ment­a­tion on Upgrad­ing to 2.0 from 1.3 is basic­ally a list of fea­ture changes, rather than instruc­tions on how to upgrade or what modi­fic­a­tions need to be made to the con­fig­ur­a­tion files. Look­ing at the con­fig­ur­a­tion files them­selves in the Debi­an Sarge Apache 2 dis­tri­bu­tion you can see, for example, that httpd.conf has changed markedly from being the main con­fig­ur­a­tion file to con­tain­ing simply a com­ment say­ing it exists for back­wards com­pat­ib­il­ity only. The README file does have some clues to the new files, with short descrip­tions of what they’re used for. The most inter­est­ing new dir­ect­ory to me was sites-enabled, which seemed to have some­thing to do with set­ting up vir­tu­al hosts. So I typed sites-enabled into the Apache doc­u­ment­a­tion search engine and found no hits what­so­ever. The Vir­tu­al­Host part of the doc­u­ment­a­tion for Apache 2.0 says “Below is a list of doc­u­ment­a­tion pages which explain all details of vir­tu­al host sup­port in Apache ver­sion 1.3 and later.” Hmmm, things do seem to have changed some­what between Apache 1.3 and Apache 2.0. On the oth­er hand, it’s always pos­sible that this par­tic­u­lar con­fig­ur­a­tion and choice of dir­ect­ory names etc is due to Debi­an rather than Apache; the Debi­an dis­tri­bu­tions do have a repu­ta­tion for put­ting files in places that are unex­pec­ted and maybe this has exten­ded to the names used in the Debi­an fla­vour of the Apache install­a­tions. If this is the case it’s not sur­pris­ing it isn’t doc­u­mented on the Apache web site.

For­tu­nately oth­ers have writ­ten this up; I found Upgrad­ing to Apache 2 which described the pur­pose of the sites-enabled and sites-avail­able dir­ect­or­ies in ways that make sense and worked when I tried them out. The same prin­ciples apply to mak­ing the mod_rewrite mod­ule avail­able, which Word­Press uses for rewrit­ing the URLs for archives and categories.

So far, so good. My web site is avail­able again, just not my blog. The error mes­sage is “Your PHP install­a­tion appears to be miss­ing the MySQL which is required for Word­Press”. When I check, all the neces­sary pack­ages are installed. A quick search through the Word­Press sup­port site turns up that I’ve for­got­ten to uncom­ment the MySQL mod­ule in the php.ini file. I’m so used to Debi­an just doing the right thing that it seems odd to have to make that change, some­how. Now my blog is back as well, everything else seems to be work­ing, no files seem to have been lost, and over­all the upgrade was a lot less pain­ful than I had anticipated.

May 212005
 

Last week I upgraded the blog soft­ware to Word­Press 1.5.1 from 1.5. Here­with a few notes for oth­ers plan­ning to do this.

The upgrade was mostly unevent­ful, with only two prob­lems of any note, under­scor­ing that you really should deac­tiv­ate any plu­gins you have before start­ing the upgrade process:

  • BAStats does­n’t work, as it appears some of the func­tions it calls have been rearranged into dif­fer­ent files. The author seems to be think­ing of releas­ing a new ver­sion at some stage, so for the time being I’ve just turned it off. 
  • The feeds were empty, but search­ing on the WP sup­port for­um came up with a patch (update: no longer avail­able, or needed) which fixed the problem.

Of course, now the Word­Press team have released 1.5.1.1, which includes that bug-fix, so I just spent the last 10 minutes (lit­er­ally) installing that. The 10 minutes includes back­ing up the com­plete data­base, deac­tiv­at­ing all the plu­gins, installing, react­iv­at­ing the plu­gins, and check­ing the results.

All in all a rel­at­ively pain­less upgrade. I gath­er there are a lot of secur­ity fixes, which alone make the upgrade worth­while, and it also meant I could install Spam Karma 2, which is a big improve­ment over the pre­vi­ous ver­sion, both in being able to get rid of old com­ment spam and not have it clut­ter­ing up your data­base, and in its fil­ter­ing abil­it­ies. Both of these factors made upgrad­ing worth­while. Now I just have to find the time to write more!

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.

/* ]]> */