Serial communication with PHP

Pitfall number one might be "Using Windows".

I'm sorry - I just had to say; couldn't stop myself! ;D

I guess its because I've been using *nix for so long, I've just gotten used to having things work (well, most of the time!).

Anyhow - I just want to offer up something on that portmon output; likely the "2" you are seeing has to do with the character you are sending ("a") plus another character (newline? null?) - however, that doesn't explain your issue...

You might try going old-school with an old computer running DOS (ack!) and QBASIC (double-ack!), so you can get direct port access, just to test your code on the Arduino; once you know that is working correctly, then you can concentrate on your Windows box; alternatively, you could do the same in *nix, and write directly to the USB port in your PHP script via fopen(). At least, once you know what is working, then you know what isn't (profound, I know).