Faster PHP development
I can’t believe I didn’t do this sooner:
- Download Apache for Windows
- Install it (note that this is an abbreviated version of a PITA)
- Download PHP for Windows
- Install it (PITA PITA PITA)
- Tell HTML-Kit (in Edit->Preferences->Preview->Edit Preview Rules) that the server path for your dev directory is 127.0.0.1
- Load test.php in the editor, switch to the preview tab, do the Dance of No More Uploading To Test PHP Scripts
Up next:
- Download ActivePerl
- Expect another PITA
- Install MovableType locally
- Test hacks with considerably more safety
<update>Installing ActivePerl was completely painless, as was installing MT (missing a module? Start menu -> Perl Package Manager -> “install Image-Magick” -> all done)</update>
You can also use PHP Triad: http://sourceforge.net/projects/phptriad
and save a few steps. It will also install mySQL which is fun to work with, and I hear the next version of MT will support it.
I started to install (reinstall, really) Triad, even though I didn’t have much luck with it the first time (last December), but when I started reading about how J Wynia had dropped the project because everyone took and took and took and never gave anything back but bad attitude, it started to sound waaaay too familiar, so I ran for the hills. And really, it wasn’t all that hard to install the newest versions of Apache/PHP/Perl, even though I felt compelled to bitch about it. mySQL is in the download queue (12MB, oof) – I know that I need to use it more, but I haven’t done much for fear of messing things up. Which makes it perfect for desktop experiments.
Another option for testing CGI development on Windows is to install Indigo Perl.
http://www.indigostar.com/indigoperl.htm
Indigo Perl is a free binary build of Perl with a built in copy of Apache.
That looks pretty cool (downloading as we speak), though I think my homebrew setup will suit me better (same path to Perl and roughly the same Apache config as my host, so I shouldn’t have to make any changes before I upload things).
Next time, before I do something, I’m going to post asking for advice on how to do it, though.
An alternative to Triad is FoxServ, Release 3.0 expected to come out any moment with latest Apache 2.0, PHP, MySQL, Perl etc.
I got my version on a CD-ROM with a magazine (Triad was on it as well) otherwise aim your download queue to:
sourceforge.net/projects/foxserv Homepage at
http://www.foxserv.net
You might also find OpenSA a reasonable alternative; it’s a packaged up version of Apache for Windows with mod_php already in there for you. And an InstallShield installer, so setting it up is all point-and-click. Moreover, if you need to test ASP stuff, it does that too (no IIS! Hoorah!), although it doesn’t support SSIs in ASP code.
(Note that the SSI thing would probably be the work of ten minutes fixing for anyone vaguely competent in C, and then it would be a complete replacement for IIS. Somebody do it, please. :-))