Wednesday, 9 May 2007

php-gd - As Easy As Tea

I remember hearing a story about a guy who went to an airport in order to have a five minute conversation with another guy who was about to board a plane. Apparently the guy boarding the plane charged the first guy a hundred quid a minute for his time. A lot of dosh, especially twenty years ago when I heard this story, but according to the story the information was worth a lot more than that to the guy doing the asking.

Alas my endeavours with Fedora are not going quite so swimmingly as I had hoped. The whole point of switching to a server with Fedora was that it appeared to be much more widely documented than the CentOS Linux on my old server (see note [1]). Unfortunately, now that I'm trying to use that information I'm find it difficult to find the bits that I actually need amongst the masses of information that's out there. If you want a run through on how to install it you can take your pick but if you want to know something about a particular issue with regard to using it...

A good example is the fun I've had with the GD Library for PHP. Some of my scripts make use of functionality from the GD Library for manipulating images and while this was already set up on my old server it was not set up on the new one. The information on how to get it working was very difficult to track down. My books had nothing to say on the subject (or at least I couldn't find it) and the relevant websites (, and assumed that I knew things about installing and configuring that I don't and in some instances made references to files and directories that are not on my server (presumably because the information relates to a differnent version of Linux).

In the end I put in a call to tech support at the company from whom I lease the server and was told to enter the following at the command line:

yum install php-gd
/etc/init.d/httpd restart

It was as simple as that. Yum installs the package and then you restart the apache server. Pretty obvious really, but things always are when you know. It also occurred to me this morning for example that there is nothing on the box of tea bags that says to put the bag into the cup and add boiling water as opposed to tearing open the bag and tipping the tea into the cup. Pretty much anything else would require us to empty out the contents from the 'sachet', but not the ol' tea bag. Obvious WHEN you know.

It seems therefore that until I become a lot more familiar with Fedora (and I'm only going to achieve that by using it) I'm destined to spend hours of my time digging through mountains of information in order to find the snippets that I need. I'm not saying that I could justify a hundred quid a minute but I'm very grateful to tech support right now.

[1] See this post for why I've realised that this was a mistake.

No comments: