Showing posts with label apache. Show all posts
Showing posts with label apache. Show all posts

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!

Saturday, 20 March 2010

Linux - R.I.P.

Here we go again, another anti-Linux rant ...

Well not _exactly_, but here is an illustration of how "naff" Linux is to a long-time Microsoft DOS/Windows user :-

When I set out to learn about Linux, I had two objectives. The first objective was to learn about Linux, obviously.

The second was to run a web server (ie host web sites on my own equipment in my own home).

Both of these objectives were achieved up to a point, but when it came to hosting web sites I also wanted to learn about the analysis of traffic associated with those sites.

To that end I installed "Webalizer" and that is where the problems with Linux really came to a head.

The darned program kept the access logs created by Apache so locked up that Webalizer was unable to access them. No matter what I tried the result was always the same.

For the sake of comparison I then decieded to load both Apache and Webalizer onto a Windows XP machine.

I got Apache up and running on the Windows machine in probably not much longer than half an hour (I was familiar with the way the Apache configuration files worked, so I wasn't exactly starting from scratch), and Webalizer was installed and activated in pretty much the same amount of time.

Webalizer on Windows is now happily producing the web stats I was trying to get from the Linux installation, all with about an hour's worth of effort.

Well at least I tried!

Linux seems to me to be a bit "exclusive", rather like a Golf Club.

Golf Clubs don't really like to see the "ordinary bloke on the street" cluttering up their courses and facilities, so they make membership difficult to achieve (by charging lots of money, or by imposing conditions on would-be members, etc etc) whilst pretending that membership is "open to all". The reality is different, it's a hobby for the "chosen few".

Am I referring to Golf Clubs or Linux in the last statment? I'll leave the reader of this to be the judge of that!