By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,132 Members | 1,417 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,132 IT Pros & Developers. It's quick & easy.

Short instruction: Install PHP (ISAPI) on Vista (IIS7)

P: n/a
Hi,

I am one of those questionable people that started with Vista (Home
Premium).
Not because I think it is a ready/steady OS, but partly out of
curiousity, and partly because I needed to work on an old project that
happens to run on IIS6/W2000/MSSQL7, but my W2000 machine couldn't
handle the size of the database in question anymore. :-(
My new Vista machine is 5 years younger and is a lot faster, so I
started to figure out how to use IIS7 on Vista.
(I could use only the database on my fast machine, and leave the PHP on
the slow W2000, but that would be too easy.)

For clearity: I do not recommend PHP5 on IIS7, use Apache when possible,
but if you have to use IIS7, here are a few pointers/thing I found.

Installing PHP5 on Vista/IIS7 is easy, once you find the right walkthrough.

General considerations:

1) I understand that the new FastCGI rocks (stable and fast), but I
picked the ISAPI because that is the setup of my client.
So if you need more speed, try FastCGI approach.

2) Don't try the installer found at php.net on Vista. (Actually, don't
ever use that thing because you won't be able to install extensions for
php, like mysql). Always use the zipped version and install by hand.

3) Put the php folder under the inetpub tree (but not in wwwroot). That
way the phpfolder will inherit all right permissions under Vista right away.

Install:

I am not going to repeat how to do this, but instead post the sites I
found good. I found many sites describing how to install PHP on IIS7,
but most aimed at beta releases, and many tutorials just didn't work.

Two walkthroughs that are good:

http://blondr.blogspot.com/2006/11/s...and-php-5.html

This one describes also installing mysql.

and

http://blogs.iis.net/bills/archive/2...RC1_2900_.aspx

Mind that in this description step 4 says:
<quote>
4) Install IIS7, making sure you install the ISAPI Extension component
(for PHP-ISAPI - which is what I use) or the CGI component (if you
prefer CGI)
</quote>

I misinterpreted that line at first, but it means that WHEN installing
IIS7, you must specifically select (by hand) that ISAPI Extensions are
allowed.
http://blondr.blogspot.com/2006/11/s...and-php-5.html
does describe this step with nice screenshots.
(You can't miss it, unless you happen to run a Dutch version of Vista as
I do, and must make guesses how they translated the english.)

ISAPI Extensions is set to 'off' by default, leading to confusings
errors later on when trying to add the handler that directs *.php
requests to the php5isapi.dll.
(Why can't M$ just say: "Enable ISAPI Extensions in IIS setup first" ??)

Well, I hope this saves somebody a headache. ;-)

Good luck!

Regards,
Erwin Moller
PS: General Vista tip: If you use XP and are considering to 'upgrade' to
Vista, better wait untill SP1 comes out somewhere in 2008.
If you don't use a M$ OS, keep it like that.
Sep 14 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.