Archive for November, 2008

Charity’s social payoff

Posted in Uncategorized on November 26th, 2008 by Les – Be the first to comment

Well, I’m off to a fun-packed evening of “Frog Racing” in aid of my son’s school. What I don’t understand is this. Why? I’m not questioning the merits of raising money so the school association can do interesting things for pupils’ benefit that normal funds wouldn’t stretch to. No, what I’m wondering is why does it have to be a social event?  Local companies, mostly owned by parents have contributed generously to sponsor tables. In addition each attendee has made a contribution to go along and partake. The thing is, I don’t think it would be an exaggeration to say that none of those in attendance or who have contributed are living on the bread line. Far from it.

I just don’t get why “they” feel the need to socialise. It’s not like they don’t get out. A more socially mobile bunch of parents would be difficult to imagine.

Here’s a suggestion. It applies equally well to playgroups, other charitable outfits and PTAs everywhere. Why not just confess: “We need money, you have it, please given generously.” Large charities get away with this every day of the week. When was the last time you had to (or, at least, felt compelled to) pitch up at Royal National Institute for the Blind evening of fun and frolicks? (assuming they even have them).  Never I’m betting. You just put your hand in your pocket and throw the change in the bucket – because you can afford to. When was the last time you bought a copy of The Big Issue and had to have dinner with the guy selling it. When was the last time you made a charitable donation in return for a night out? You haven’t. If you’re donating in the expectation of a return in kind or otherwise then it’s not charitable is it!

Come on people; If you want to get together, just do it. If you want to give money to the school, just do it. The last fundraiser I actually paid NOT to go. I paid for my Wife’s friend to go with her. That seemed to work for everyone. But, I’d have happily given the £50 had they just said “Can we have £50 for the school?”.

Here’s an even better idea. Don’t use the petrol. Don’t buy a new frock. Don’t buy booze and food. Instead, if you want to do something charitable, stay in. Stay in and write a cheque for the amount you would have donated plus the amount you saved by staying in. Once in every ten night outs during the year, just stay in instead and make a donation to your chosen cause. The world’s charities will benefit enormously. And the more lavish your lifestyle, the more the charity gets.

Redirecting apache command line output on Windows

Posted in Windows Apache MySQL PHP on November 24th, 2008 by Les – Be the first to comment

So, you want to run

httpd.exe -tS

to syntax check your conf file and view all virtual hosts. You need the virtual hosts info in a file but

httpd.exe -tS >file.txt

doesn’t work.

That’s because apache output goes to STDERR not STDOUT. I have used dos/windows for years and never had cause to know or use this but simply doing.

httpd.exe -tS 2>file.txt

Will work as it sends the STDERR output to the file you specify.

Sleep deprivation and KraftWerk

Posted in Dear diary, Life, Silliness on November 24th, 2008 by Les – Be the first to comment

So, I go to bed late and plan to begin work today at a respectable 9am. Usually I consider myself very fortunate to live so close (15 mins drive) to the office. But this brings with it key holder responsibilities and this morning I get a call at 3.30am – just 3 hours after heading off to bed – telling me that the intruder alarm has been triggered at the office.

We’ve had false alarms before so it did cross my mind not to bother going down. I was barely conscious after all. If I go, by the time I checked it out and come back it was going to be almost 5 and the kids would be up between 5.30 and 6 making real sleep impossible at home. So, I tell my wife I will work early and come home early. The house will be empty for a couple of hours after lunch so I can catch up on my sleep and perhaps get some more work done before the evening play/dinner/bath/stories/bed routine.

Well, conscience got the better of me and I decided to go down. If two zones had been triggered, the police get notified automatically but for one, it’s just me. The most likely scenario is a false alarm, the next most likely, kids who would have been scared off by the alarm and wouldn’t hang around. But they might leave the building insecure so I have to go.

At this point one can’t help wondering what if there IS an intruder? Well on balance of probability I think it’s very unlikely someone set off one zone and subsequently disabled the alarm but nonetheless, caution is in order so my Wife sets an alarm for 30 minutes hence. If I don’t text to say all is well before the alarm goes off then she calls the police. At least if I’ve been left for dead or am otherwise incapacitated help should arrive very soon after. My wife isn’t going to sleep until I text anyway so this seems like a sensible precaution.

Well, as expected it appears to be a false alarm. I can’t figure out the alarm to tell me which zone it was so I decide to stay and begin the working day early. It’s useful, I have another server migration to do, this one can be done without notification to customers so I begin. The few minutes I have to write this post arises from the backup/restore/cycle that takes a while and starting any other meaningful work that will be interrupted a few minutes from now by a completed restore is foolish, resulting only in something else that will be delayed by interruption (llike my sleep).

Disruption to one’s slumber can have odd effects on the morning brain. Almost since I arrived here pre-dawn I have had the song “The Model” by KraftWerk playing in my head. You know the one, “She’s a model and she’s loo-king good… da dum, da da da da da da de dum”. This is often my “song for the day”, that often good but frequently dreadful tune that you have running around in the noggin all day long. This morning though, it’s so pernicious that on returning from tea-making a moment ago I sat at my desk, noticed the restore wasn’t finished but that my PC was strangely silent and wondered where is Kraftwerk? why has the music stopped? What crashed?

Several minutes of frantic clicking wondering why iTunes has closed -or was it a radio station I was listening to? or BBC iPlayer perhaps? has resulted in the eventual realisation that this song was only EVER in my head today. I’m at work. I don’t have an iTunes library here. That’s at home. iTunes didn’t close down. iPlayer or the radio didn’t close down. I wasn’t listening to anything other than my own sleep-deprived brain. “da dum, da da da da da da da dum”.

That’s all for now. It looks like the restore is nearly finished and I must also yawn repeatedly for a few minutes. As no doubt will you after reading this tosh.

Toothpaste Art

Posted in Parenting, Silliness, Uncategorized on November 15th, 2008 by Les – Be the first to comment

To my youngest two children, twin 3 year old boys.

  • Toothpaste is not paint. The bathroom is white enough.
  • Toothpaste is not glue, no matter how well it appears to function in this regard.
  • Toothpaste is not a lubricant. Doors work less well when toothpaste is present on the hinges.
  • Toothpaste is not food. You cannot live indefinitely on it. You are going to have to eat your dinner some day soon.
  • Toothpaste is not face paint.
  • Toothpaste is not sunblock.
  • Toothpaste may be an effective restorer of tiling grout but this is a job Daddy will do.
  • Toothpaste is not known to be fatal to tooth fairies regardless of what your big brother says.

It’s Christmas. Well, nearly.

Posted in Grumpy old man on November 15th, 2008 by Les – Be the first to comment

Well, it feels like it anyway. There was a certain nip in the air tonight. A Yuletide chill you might call it. A definite yet undefinable feeling that Christmas is upon us. On my way into the DIY store the scene was as boring and depressing as any other night when leaving the office promptly at 5. An endless stream of cars stretched back from the red light, blocking the entrance to the store car park, blocking others turning right, churning out billowing clouds of noxious fumes from recently started engines. Altogether more than a little grim.

On exit from the store though, what a difference! The endless stream of lights, white, yellow, red, amber, the occasional green, some blue from those daft windscreen neon affairs, all of them were now as fairy lights; twinkling not in the sluggish monotony of the winter commute but in brightly buzzing anticipation of the imminent arrival of a fat jolly bloke in a red suit. Of course anthropomorphising car lights is a sure sign that it was my mood that altered rather than the light’s but briefly, that’s what crossed my mind, and now it’s out there for the psychoanalysts among you to make of it what you will.  There I go again making the assumption that more than one other person actually reads this stuff.

I can only imagine that briefly I was whisked backed to the happier Christmases of childhood. I don’t mean that my Christmases as an adult are bad, or have been. On the contrary, since my good fortune in marriage and parenthood, Christmas has taken on slighter brighter hue with each passing year. I simply mean that not all the childhood Christmases filled me with joyful optimism. That’s a different and lengthier post altogether though.

I am, I’m sorry to say and for no reason that I can articulate though probably related to the comments above, a bit of a miserable sod when it comes to Christmas. The whole affair just gets me a little bit down. I’m happy Dad of course with the kids; “It’s for the kids really isn’t it?” as they say and there is much fun to be had watching and helping them enjoy it but frankly no more fun for me than is to be had doing any jigsaw, playing any word game, drawing any picture with the kids throughout the year. I’m very fortunate to work near to home and to work flexible hours (at least flexible attendance at the office. The actual hours worked are still too much by many people’s standards but early mornings and adult evenings are forgone in preference to being home at a time when the Kids are awake) so I get to be an active and participatory dad. Perhaps this is why I don’t value the holidays as much as one might. I get to spend time with the children 7 nights a week and weekends with very few exceptions throughout the year. Were I unable to do that I suppose I might hold the Christmas break to be a little more precious than is my wont.

As it is, there will be repeats on telly, the weather will be foul, it won’t snow, I’ll eat too much, put on a stone in weight in 2 weeks that will take me all year to lose if I lose it all, friends and family will turn up or send such copious amounts of chocolate and biscuits that we won’t make a dent in them until Easter when it will pile up again. And of course the house will be consumed by an avalanche of presents from near and far. It’s all very very silly.

On the matter of presents, I should like to offer this thought, the razor sharp logic of which, I claim for myself (if it’s someone elses I can’t remember when I heard it. If you know different, speak up).

I have all I need. What I do not need but really want I can buy myself. If I can’t buy it because I can’t afford it then you can’t afford it either or, if you can afford it, you don’t feel the need to buy me presents anyway. The logical implication of these facts should be obvious. Any present you buy for me can only possibly be something I don’t need or something I don’t want. Thanks for the thought but save your money. Pay it off your mortgage (every pound counts) or another debt or give it to ChildLine or Children In Need or some other good cause close to your heart. Buy yourself a premium bond, you might win big and give a bit more to your chosen charity. There are an infinite amount of better things you can do with every “present pound” than spend it on wrapping paper destined for the recycling along with whatever you were thinking of putting in it.

Oh, and please don’t tell me that my misery is the result of the heathen-fuelled greedy, coveting, materialistic existence of the developed world and that Christmas is really about religion. No. Religion just spoils the “party”. It used to be about religion when the human race was young and stupid. It used to be about religion when early Christians adopted a pagan festival so they might more easily convert the feeble minded masses from one delusion to another but these days it’s just something to mark the end of the year at its most miserable zenith (in the northern hemisphere at least).

WordPress Suddenly Slow – Check your DNS resolution

Posted in WordPress on November 6th, 2008 by Les – Be the first to comment

So, in recent weeks I have “discovered” and enthusiastically embraced WordPress. I’m now hosting several blogs. But a couple of days ago I setup a new blog. Same apache config as the others, same server, same WordPress version, no themes or plugins, an absolute virgin install.

It worked. But man alive it was slow. I mean S L O O O O O W. Any page took at least 12 seconds (actually almost exactly 12 seconds longer than the login page for example was loading on the other blogs. Comparable pages between fast blogs and slow blog were 12 seconds slower on the duff one) to display (even the login page). Non-php resources such as css, js, images were all loading just as they did on the other blogs (which themselves continued to be speedy).

Anyway, to cut a long story search I Googled myself half to death and found many such reports but no real answers. Usual solution was plugins misbehaving but this didn’t apply to me or to many others suffering similar problems.

The problem for me turned out to be DNS. Yep, that simple. The blog was at blog.domain.com. My own machine resolved this address perfectly well (obviously since I could see the blog) but a server DNS issue meant that it wasn’t being resolved on the server (I have root access and was able to ping the domain name from the server itself and witness a failure.) And guess how long it took for a “ping blog.domain.com” to time out on the server? 12 seconds.

I sorted the DNS problem and bang, it speeded up just like the other sites. So, it would seem that somewhere in WordPress there is a DNS lookup being done, perhaps gethostbyname() upon the blogs own “name”. The blog and the admin etc work perfectly but a failed attempt at name resolution somewhere adds a constant to each page load. The actual duration will depend on individual server resolvers I guess.

This could easily explain some reported problems at various hosting companies. Working blogs suddenly take 30 to 40 seconds to load then time passes and they are ok again. I may venture a patch or a plugin to WordPress to “fix” or at least detect this situation. DNS servers do pack up occasionally or a server or LAN DNS server becomes unavailable. YOu wouldn’t expect WP to have to resolve its own host name but when it can’t you have a problem.

I’m off to do a find in files for “gethostbyname” and related functions.

Barack Obama wins presidency of USA

Posted in Grumpy old man, Politics on November 5th, 2008 by Les – Be the first to comment

I feel buoyed this morning by the news that Obama is to become president. Strange. I’m not sure why I am so interested. Perhaps it’s just age, perhaps parenthood but I do detect within myself a modest amount of anticipation – eagerness even – about what this man may achieve.

Some of the excitement is without doubt because I feel that the first African-American president heralds a change in attitude of a nation and because of the domination of that nation, to a degree, the world at large. I’ve always believed that he should win but I admit I was of the extremely cynical view that the peoples of the United States would never elect an African American president. I’ve rarely been so pleased to have been proved wrong. I recognise that this is one of those genuinely historical moments. It’s akin to watching the Berlin Wall falling (literally, falling), the release of Nelson Mandela or the premiership of Margaret Thatcher. Though the first female prime minister of the UK seems rather tame by comparison to the others, it was a change that changed Britain and the world so deserves a mention. Obama as president feels bigger though. It feels bigger than all of these.

As a parent it’s no overstatement to say that I actually feel as though the world just became a safer place for my children. I’m a UK citizen. My family and I enjoy peace and security that lots of people can only dream of and yet still I feel the world just got safer. Very strange that the appointment of one man to office (I know, he’s not there yet but you know what I mean) can have such an effect on one who is frankly, usually dismissive of world affairs and politicians generally. I think (I hope I get this right)  it was Winston Churchill who said “Any person who seeks public office is eminently unsuitable for the job.” I’ve always liked that and to a large degree I believe it but today I believe it a little less.

With an early start this morning I managed to hear the last few minutes of Obama’s speech and very impressive it was too. Passionate, yes. But measured, practical, restrained and even to a non-US citizen, uplifting. One can’t help but feel that this man realises the challenges the USA faces.

As a final, possibly trite, observation I must say that whenever I have heard George Bush Jnr. speaking I have felt the sort of discomfort one feels when someone clearly unsuited and incapable is thrust unfortunately into a public speaking role. Listening to Bush over the last two terms has felt like being perpetually stuck at the worst wedding speech you could imagine. The delivery is so bad it has you squirming in your seat, embarrassed by proxy.

Regardless of his policies, Obama’s eloquence alone; the simple fact that he is capable of delivering a speech or answering a question in what feels like a genuine, knowledgeable and passionate tone will be a huge boon to America’s profile worldwide. Like it or not citizens of the United States, the only American most people will ‘know’ is the one who appears on their TV with the sub-title President. This is who they think ALL Americans are. For the past 8 years the world has seen you, unfairly, as bumbling idiots.  That is about to change.

Can’t create TCP/IP socket (10106)

Posted in Windows Apache MySQL PHP on November 4th, 2008 by Les – Be the first to comment

This post may help some other Windows/Apache/Mod-fcgid users out.

We recently migrated a windows 2000 Apache install to a Windows Server 2003 box.

Despite having all the mysql libs, the pho_sockets module etc configured php kept failing to connect to a mysql localhost with the error “Can’t create TCP/IP socket (10106)

After much googling and little answers (though many others having the same problem) I realised that in my httpd.conf in the section where we set runtime values for the PHP (such as PHP_RC, TEMP FOLDER etc.) included the path C:\WINNT which of course was fine on windows 200 but on Server 2003 should have been C:\WINDOWS.

Once all these paths were changed and apache started, all was well.

My guess is that php_sockets is dependent upon windows winsock implementation and with duff paths being passed to php-cgi.exe the winsock library could not be loaded and hence all socket stuff failed.

I’m only guessing though. Whatever the reason it’s unimportant since there was a clear problem with the paths.

Hope this saves someone else a couple of hours!