Friday 22 April 2011

Wrestling with PHP, MySQL and Simple Machines Forum ...

Like a lot of busy folk, I've been looking forward for some time to the few days off work around the Easter / May Day holiday period (enhanced (in length at any rate) by Royal Shenanigans of course) to allow my poor old brain to cool down and to start functioning again.

So it was I returned to tackle a little problem I had set myself a few months ago, to install a Simple Machines Forum on my own web server, with the principle objective of using said forum as a tool to help our local Repeater Group operate.

I'm not an IT professional, but as I understand it, a Simple Machines Forum is some nifty code written largely in PHP, XHTML with some neat CSS, and which is in turn a "front end" to an SQL database.  I hope I've got that right, but that's how I've got it figured in my head at any rate.

Conventionally, people wanting to install SMF applications (which are free!) usually upload the said files to a web server provided elsewhere, and apart from tweaking the forum to look feel and operate like you want, that's more or less it.   Not that I am belittling such things, as they do take quite a bit of tweaking, it seems.

Of course this just isn't good enough here in the G4FUI shack, as I am running the repeater group web site in question on my own PC so the operation is a wee bit trickier.

You have to install PHP (free), MySQL (also free!),  configure Apache (the web server I use) to talk to PHP, and you have to configure PHP in turn to connect to the SQL service so that SMF can build a database and shuffle data in and out of it on demand.

It all sounds a bit geeky, doesn't it?   Well that is precisely how I found it.

Luckily there is a lot of helpful information out there on the web, and after a bit of "Googling" I found some advice which seemed to be pretty well aimed at my own requirements.    As a side note, whilst I was browsing through the various troubleshooting suggestions I couldn't help but notice the lack of hostility and aloofness which I have found on some of the equivalent Linux pages.   Maybe I'm imagining it?

The first serious attempt to get all this working was a month or so ago, and that ended in failure, so the project was "parked" until the Easter break.

The second attempt was much more successful.   Careful reading of the online advice revealed a little trick with a command line box.  This didn't produce a working system but it did produce an error message which was a bit of a giveaway "unable to find ..." followed by a file name which looked sort of  familiar.

The file in question had featured in one of the configuration files (php.ini) I had carefully edited a while ago, and if I'd only spelled the name of the file correctly my system would have been up and running a month or so ago!

D'oh!  Just one little letter makes such a big difference!

No comments:

Post a Comment