Friday, September 05, 2008

There are various tutorials (including in the PHP distributable) on how to install PHP on Windows XP for development.  Few are this straightforward, and none (that I could easily find) use the ZIP file, allowing for you to easily upgrade and/or remove PHP cleanly from your system. 

  1. Download PHP from PHP.net.  Get PHP in the ZIP distribution.
  2. Create the directory c:\php, and expand the distro in that new directory.
  3. Add the new directory to your PATH variables.  PATH variables are found by right-clicking on My Computer -> Properties -> Advanced -> Environment.  You'll see many system variables.  Select "path" and edit, adding "c:\php" (without the quotes) preceding or following it with a semicolon, depending on where you put it in the string.
  4. Copy and rename php.ini-recommended to c:\windows\php.ini
  5. Edit php.ini setting the following:
    1. doc_root = c:\inetpub\wwwroot
    2. cgi.force_redirect = 0
    3. extension_dir = c:\php\ext
    4. (optional) uncomment extension = php_mysql.dll
  6. Add ISAPI to IIS by first opening the IIS MMS.  Right-click on Web Server -> Properties -> Home Directory -> Configuration -> Mappings
    1. Add c:\php\php5isapi.dll, setting .php as the extension, then click OK twice to Home Directory
    2. Add same DLL to the ISAPI modules, naming the module "PHP"
  7. Change to Documents tab, and add index.php (to allow for full PHP sites)

Make sure all of your settings are set by stopping and restarting IIS by running NET STOP iisadmin, then NET START w3svc.

To test, create a new IIS virtual directory and create a file index.php, edit it adding the following code:

<html>
<head></head>
<body>
<?php phpinfo(); ?>
</body>
</html>

Save the file, then open your new IIS app.  If all goes well, you'll be looking at a PHP screen enumerating all of your file settings.

If you want to remove PHP, just reverse the steps starting at #7 and go backwards.  It's really that easy.

[Update: 10/7/08]

In a new virtual XP Pro install, I have had 401.3 errors on this install.  I found this (rather draconian) "fix" to the 401.3 error I was receiving.  YMMV, but it did seem that the install was having some strange ACL issues.

Technorati Tags: ,,,
posted on Friday, September 05, 2008 2:32:35 AM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Thursday, July 31, 2008

genius_bar I'm 4 weeks into my Grand Apple Experiment, and I've had to officially visit the Genius Bar.  Yuck.  One of my early concerns with getting into this with Apple is that they provide no onsite support for business customers.  If issues like this keep continuing, Apple won't get any of my company's future business, despite their good hardware.

My company makes money directly by billing hours to my clients.  If I'm not working, I'm not making money, simple as that.  When my MacBook Pro started making a horrifying grinding noise, I was worried.  Not a little worried, as this wasn't a "little" noise, but a lot worried.  I was able to reproduce the noise on multiple occasions, so off to the Genius Bar I go. 

Bad fans, it turns out, and I believe it's either a bad bearing or some missing piece that is causing the fan to get out of alignment.  This is not a sound I want my 4 week-old computer making, and it's very likely that a bad fan will cause early failure of other hardware.

The nearest Genius Bar is a 25 minute drive from anywhere.  That plus the wait plus the diagnosis plus the drive back easily puts me at 2 hours of lost work.  The new fans came in within a week, so off to Apple I go again, (25x2 + 2 hour bench time) for another 3 hours of lost work.  That's 5 hours.  Gone.  Not good.

The Genius Bar did a fine job and my computer no longer makes unexplainable noises.  That said, Apple really needs to provide on-site service to business clients for me to consider more hardware from them in the future.

posted on Thursday, July 31, 2008 3:22:18 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Friday, July 25, 2008
Again, I apologize for my absence of late.  A wonderful week-long vacation in Southern California which provided my body much needed outdoor time left me renewed and ready to code.

Just before leaving, I began the switch in my company from Dell hardware to Apple hardware.  This was a decision I really labored over.  All of my pro's and con's could be distilled into the following list:
  • (Con) I really don't know UNIX, and maintaining a hetrogenous set of OSes in my network scares me more than a little
  • (Pro) The MacBook Pro is the fastest laptop running Vista on the market
  • (Con) Entourage is no substitute for Outlook, which is my Killer App
  • (Pro) I can not only develop Windows-based apps, but Mac and iPhone apps too
  • (Con) I'm an old dog
  • (Pro) I like learning new tricks
So there you have it, it's tied.  Well, actually not so much; to conserve cash, I like to lease my computers.  Sure, it may cost a bit more in the long run, but in the short term I don't have to lay out $1-2k per seat, but rather ~$70 per month per seat.  So when I started looking into Apple's corporate financing, I was confused.  Although I eventually got it worked out, Apple's online information proved to be out of date and just plain wrong.  (Specifically?  Don't click on the link to fill out a lease application online.)  Hmmm... not a good way to start out a B2B relationship.

My other fear is Apple's pure lack of on-site support.  I'm coming from years of owning Dell hardware, and say what you will about their offshore call center, every time I've really needed assistance, Dell's been there and provided me top-notch service.  Apple on the other hand makes me go to them.  Again, not a great model for B2B and only passable for consumers.

Why switch?  Simply this: the iPhone.  No, no, I don't have one, but it's arguable that the iPhone is the greatest tech consumer appliance in the marketplace.  If Apple gets Exhcange integration right, it really could be The Killer Device for all corporate types, and that's impressive.  So, if I ever dream of even touching a line of code for the iPhone, a Windows-only box simply won't do.  In short, Apple hardware provides me flexibility that a Windows-only box can't.

So this is the start of the Grand Experiment.

posted on Friday, July 25, 2008 10:13:23 AM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Friday, June 27, 2008

GoogleAnalytics I've been on a vacation from making posts recently, mainly because I've been so busy at work and home.  Certainly not because I don't love my readership... all 3 of you.

Anyway, I thought I'd take a peek at my Google Analytics statistics and found that - despite my absence - my readership is growing healthily, getting bigger by the day.  How wierd is that?

Well, there might be an answer to this: Grisoft's AVG v8.0 virus protection.  It turns out that the latest version (optionally) installs a browser plug-in, called "LinkScanner", that will ping all search result websites to determine if the site is malicious.  Although it's an interesting idea, many statistics are gathered from web logs, and these logs are getting artificially inflated due to this extra ping.

I'm not sold that Google or Microsoft analytics are getting artificially inflated, but it certainly could be something to watch, as web masters get more riled about their unnecessarily inflated bandwidth.

More reading:

posted on Friday, June 27, 2008 1:04:32 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Thursday, June 05, 2008

WindowsMobile Chris Craft is building one .NET-based WM application a day for the month of June, and is documenting the output (source code and all) on his blog, cjcraft.com.  If you've ever been interested in .NET development for WM, this is a perfect jump start.

posted on Thursday, June 05, 2008 11:38:00 AM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]