So no, you're not on the wrong blog.   Yes, even though I am a faithful follower of all things that come from Redmond and bare the seal of Microsoft I'm doing some side work in PHP w/MySQL.   And how interesting of an experience it has been!   I'm doing this for my church which is in a serious need to get out of 1992 and into the modern era of web pages.   It's a great church and should have a great web site; well I'm doing this - so we'll live with 'okay website' for now.  There are reasons I'm not going to go into, but in the end the decision was made that we're going to go with PHP with MySQL.   As a developer I find this a nice opportunity to get into a language I've only read about and do something 'real world' (or close enough) with it.   I am a Microsoft guy, but I know there are plenty of things just as capable out there and have long passed that naive stage that so many get stuck in of 'anti-something' because it's not what they're used to or they have some sort of bad history with it or it's not accepted in the 'cool kids club'.   So going into this my mind is open and ready to try something totally out of my comfort zone.   Plus, it's a good excuse to become more familiar with jQuery (I'm lazy at work and use UpdatePanel for everything because we're on the LAN).

So first, let me just say PHP itself isn't a hard language or a bad language; I mean come-on, any of us who have been doing this for any length of time know that a language is just a language and you can write a crappy program full of bugs in any of them; I don't find it any hard or any easier than C# syntatically.   I do find some things frustrating but that's more being a new user of the language.   For instance, they don't really have arrays in PHP; an array in PHP is basically a dictionary in the .NET world - but that's just a simple thing to remember; a syntax thing that in the end doesn't matter.   My real frustration has been in tool support and setup.

So let me tell you about my experience setting up PHP:

The PHP web site (or README, I don't remember which) recommends that you not use an installer, that you set it up using the install text file and then proceeds to goes off on a little 'holier than thou' bit about 'by doing so you'll understand the software you are installing' blah blah blah.   Whatever!   Seriously folks - installers exist for a reason - I DON'T CARE how to install it if it doesn't involve 'Next...next...next...Finish'.   Ok, so I'm not a real programmer in you're mind - but I still make a very good living writing applications with all my fancy GUI based tools - so whatever!   And if I have to, like I did with this PHP install, I can follow instrucitons - but why would anyone in their right mind do this!?  

Put it like this; for a number of years, before I was in the Army I was a mechanic.   There's virtually nothing I couldn't fix on a car (provided I had the tools and proper manuals), but I still take my car to trusted shops to get it fixed when needed (unless the pricing is too high).   And that I think is the crux of it all.   These people don't care about being a real programmer; there just too darn cheap to pay Microsoft the very small fees that they get for what they deliver, so they glorify themselves by saying it's real programming!   Can you imagine how many copies of Money Microsoft would sell if they manually made you install services, add registry keys, set environment variables, and manually update config files!   Or for the Redmond basher, you could say the same about Quicken or any other home finacial tool.   Seriously!

So anyway, I read through the install instructions line for line and got my Hello World in php going.   This took about an hour (the install, not the Hello World - that was like 30 seconds).   Except one thing...I kept getting these two 'error in Unknown Module at line 0' printed at the top of the page (very helpful descriptive error message btw for those who say Microsoft error message suck).   Google resulted in zilch (which is rare) other than other PHP pages that had the same error (and there were a lot).  So I call up a friend of mine who works 80% on PHP, the other 20% in Pearl, teaches CS for a living, and in general is a pretty darn smart guy in the OS world.  He says it's probably because I'm trying to run PHP on IIS.   So I say, but yeah...the whole big thing that the open source community jumps all over is that PHP is cross platform - it's not like .NET which has to run on IIS (which isn't true if you're using Mono on Apache by the way).   He goes, 'yeah but you know Microsoft doesn't play friendly with other competitors', to which I say 'the hell it doesn't - when something isn't working right in the JVM people jump all over it because 'Microsoft is being incompatible' and it gets fixed - so why isn't PHP doing this for IIS?  Who do I call for support?   The forums just say I need to install Apache.   I don't want Apache on my machine.   This is suppose to work on IIS and dang it I want to see it work on IIS!  Furthermore why did PHP guilt me into doing all this manual set-up crap which is probably where I (through human error) caused some sort of problem that can now only be found by a PHP guru?!   He hawed and himmed for a minute or two and finally convinced me to undo what I did (great - more manual steps) and use XAMPP.  Don't get me wrong, he's a great guy and we both enjoy these kind of spirted conversations and he finally talked me into installing Apache (via the XAMPP) install, but I can't say I'm happy about having Apache on my precious machine.   I feel dirty and guilty just saying it.

The XAMPP install went well if not long because it wants to tell you about every file it's extracting as if you care - but to not do that might appear Microsoft like and we can't have that.   The only issue was changing the Apache default port (IIS is not about to take second seat on my computer!), but after Googling, I found the correct config file to alter it to 81.   What, you thought they'd actually have a configuration window to do this in like in IIS?  (in geeky anti-Microsoft Unix hacker voice) Shah, right!   I do like how XAMPP comes with a little minimilist control panel for shutting Apache, MySQL, and others, down so that it doesn't have to run as service, but you can if you want to.   From the developer aspect, I think that's great.   From the network admin aspect (what I did prior to programming) I'd never want the option for it to not be a service, but to each his own.

Ugh.   Anyway, that's where I'm at now - as the journey continues I'll post more - I think the next blog post will be on IDE's - so far that has been an absolute nightmare subject.   But you know what they say - you get what you pay for (do you ever - I'm looking at you Eclipse!) - except in the case where I'm looking at paid products that can't even hold a candle stick to VSTS and certainly are worth the $250+ they're charging.   heck they can't hold a candle to the Express editions.   But I guess I'm just being a spoiled brat and not a real programmer.   Maybe I should break out some punch cards.