I spent a good part of yesterday afternoon setting up a PHP development environment on my primary PC. I already had PHP setup to run locally under IIS, but I wanted to make some changes to a site which makes use of Apache’s mod_rewrite module for ‘routing’. I figured it would be easier to get Apache setup locally that try to find some way of rewriting URLs in IIS (version 6, not 7).
So I downloaded a Windows binary package of Apache and installed it. I had some issues with installing for current user only, so I ended up installing it for all users. Configuring Apache was fairly straightforward, but then I have a lot of experience with Apache on Linux and the configuration files on Windows are the same. I did have to tweak one of my RewriteRule directives for some reason. Frankly I can understand why I had to change it from what I had in production. What I don’t understand is why production works the way it is.
I already had both MySQL and PHP installed. I did go ahead and install the PEAR classes. I also had to grab a copy of the HTML/IT PEAR package from one of my Linux servers since I make extensive use of it and it no longer seems to be supported in the official PEAR repository. I’ll either have to switch to another PHP template solution (like Smarty) or start using a PHP framework (like CodeIgniter). For now I’ll continue with my customize HTML/IT implementation I guess.
Next I needed a PHP IDE. In the past I’ve used Dreamweaver, but I was looking for something new (and something free, LEGALLY free I mean). I’ve been trying out Aptana Studio, but I decided to try the latest release of NetBeans. So far I am pretty happy with NetBeans. It seems to integrate pretty well with my Subversion version control repository, seems stable and has pretty good intellisense. It’s also XDebug compatible, so I can debug my PHP code in the IDE like I would debug .Net code in Visual Studio. It’s already helped me fix a whole bunch of errors I wasn’t even aware of (typos, unmatched tags, etc).