Problems Installing PHP with IIS

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
GreyPilgrim
Forum Newbie
Posts: 2
Joined: Sat Feb 03, 2007 2:34 pm

Problems Installing PHP with IIS

Post by GreyPilgrim »

Very much a newbie with all of this but I've followed the installation FAQ's on php.net and am having the following problem. when I try and run the tester program (localhost/phptester.php) I get a dialog box telling me "You are trying to download the file phptester.php, do you want to save...blah blah blah)

Installation steps carried out so far:

1) Downloaded "php-5.2.0-Win32.zip" from php.net site

2) Created a C:\php directory and extracted all files from zip archive into it

3) As per the installation notes on the php set, I've added the location of the "php5ts.dll" to the end of the PATH variable in CONTROL PANEL-->SYSTEM-->ADVANCED-->ENVIRONMENT VARIABLES-->, so now it reads "%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN; C:\php"

4) I've copied the pnp.ini-recommded file to the C:\WINNT folder and renamed it php.ini

5) Within the php.ini file I've set doc_root = c:\inetpub\wwwroot // for IIS/PWS

6) via Control Panel-->Administrative Tools-->Internet Service Manager I've:
gone into the Properties of "Default Web Site",
selected the "Home Directory" tab,
set Executable permissions to "Scripts Only",
Clicked "Configuration", and Added in .php as an executable and browsed for the php-cgi.exe in the C:\php directory

If you could give me a hint on something I've missed here I'd be really grateful.
wayneh
Forum Newbie
Posts: 5
Joined: Wed Jan 31, 2007 12:43 pm

Post by wayneh »

What version of IIS/Windows are you using?
wayneh
Forum Newbie
Posts: 5
Joined: Wed Jan 31, 2007 12:43 pm

Post by wayneh »

If you are installing on an IIS6 server, try going to "Web Service Extensions" in your IIS manager. Add a new extension named "PHP ISAPI". Right click >> properties >> required files >> add. browse to c:\php\php5isapi.dll. Open the file and then click ok. Click the allow button if it does not set it to allow by default. Click apply and see if a "hello world" script runs from your browser. I would probably restart the IIS service after adding the extension just to make sure it takes it.

Wayne
GreyPilgrim
Forum Newbie
Posts: 2
Joined: Sat Feb 03, 2007 2:34 pm

Post by GreyPilgrim »

wayneh wrote:What version of IIS/Windows are you using?
Hi - Windows 2000 pro, running IIS 5
Post Reply