SunQuest
           IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationIIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old July 12th, 2005, 12:41 PM
joeshmo joeshmo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 9 joeshmo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m 29 sec
Reputation Power: 0
Question How to install PHP on IIS 6.0 for server 2003??

Please help me out, I will be greatly indebted. This is the most painful and confusing experience.

I simply want to install PHP on a clean install of Windows Server 2003 SP1, and IIS 6.0, and IE 6.0 and use the test info php script to ensure it is working. I am clearly not a web developer, so most of the terminology is confusing to me. Everything I have found giving instructions is confusing, wordy, and requires one to be a rocket scientist to figure out. Can someone please give me a step by step instruction in DUMMY terms?

I attempted to install 4.3.2 with windows installer, and it went through but said an ocx file was missing and it couldn't configure the browser. I also attempted to install 4.3.1 with the manual process. Then I found something about adding a web service extension, which I did, as well as add an application mapping for the .php extension on the default website directory (d:\inetpub\wwwroot) which i did. Then I saved a test php file there.

the phpinfo test script file I am referring to is simply this saved in a .php file:

<? php

phpinfo();

?>

When I try to pull up the test php page I either get nothing (page cannot be displayed), or a security warning saying IE's enhanced security is blocking content from the website. I am beyond frustrated with this application.

Reply With Quote
  #2  
Old July 12th, 2005, 12:52 PM
bdreyer's Avatar
bdreyer bdreyer is offline
His name is Robert Paulson!
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Feb 2005
Location: Paper Street
Posts: 2,692 bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 3 Days 4 h 10 m 43 sec
Reputation Power: 128
Have you allowed scripts to run in you webspace?

Are you running this as an ISAPI module or CGI (did you point IIS to the dll or the exe?)

I have this configuration, it can be done, but there are quite a few little quirks that are rather buried in the documentation.
__________________
Environmental LIMS
What the hell is all this LIMS st*ff about?
---------------------------------------
PHP Pagination Function
PHP Drop Down Menus

Reply With Quote
  #3  
Old July 12th, 2005, 12:57 PM
joeshmo joeshmo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 9 joeshmo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m 29 sec
Reputation Power: 0
Quote:
Originally Posted by bdreyer
Have you allowed scripts to run in you webspace?

Are you running this as an ISAPI module or CGI (did you point IIS to the dll or the exe?)

I have this configuration, it can be done, but there are quite a few little quirks that are rather buried in the documentation.


tell me about it. this is not user friendly at all.

Here is the thing, I have a seperate test box with server 2003 (no service pack) that I setup a few months ago (painstakingly then as well) with PHP 4.3.1 manual install and I used it as I guess ISAPI (pointed IIS to .dll files) and that works. On this new server box (same setup but with server 2003 SERVICE PACK 1), I tried mimicking the settings and its not working. I have since uninstalled PHP altogether and would like to wait for instructions and try again from scratch. I will try the CGI method if that works. point me in the direction please.

Reply With Quote
  #4  
Old July 12th, 2005, 01:19 PM
Sepodati's Avatar
Sepodati Sepodati is offline
Banned
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Dec 1999
Location: Afghanistan
Posts: 14,378 Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)  Folding Points: 70305 Folding Title: Intermediate FolderFolding Points: 70305 Folding Title: Intermediate FolderFolding Points: 70305 Folding Title: Intermediate FolderFolding Points: 70305 Folding Title: Intermediate Folder
Time spent in forums: 2 Months 3 Weeks 6 Days 22 h 12 m 4 sec
Reputation Power: 1784
Send a message via ICQ to Sepodati Send a message via Yahoo to Sepodati
Use ISAPI, it'll run faster and better, imo.

I used to install PHP on IIS all the time and it never took more than a couple steps. Things that I had to do that aren't in the documentation, though:

1. Ensure the <computer_name>_USER account can read the c:\php\ directory.
2. Ensure php4isapi.dll is in the same directory as php.exe (move it up one directory, normally).
(then follow the directions)
3. Add an ISAPI filter pointing to php4isapi.dll (even though it says "optional", I've always had to do it).
4. Add application mapping pointing to php4isapi.dll.
5. Restart IIS.

Substitute php5isapi.dll if you're using PHP5, obviously.

---John Holmes...
Comments on this post
bdreyer agrees: See my post below... I just took too long to type it out...

Reply With Quote
  #5  
Old July 12th, 2005, 01:34 PM
joeshmo joeshmo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 9 joeshmo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m 29 sec
Reputation Power: 0
Hi

1) I am logged in admin, so full permissions
2) using the windows installer there is no php4isapi.dll file. There is only a php4ts.dll and a php.exe (if I try the manual extraction install, the isapi file is there, what gives?)

3)can you clarify what you mean here
4)assuming I use manual install in step 2, ok I can do this

Reply With Quote
  #6  
Old July 12th, 2005, 01:39 PM
Sepodati's Avatar
Sepodati Sepodati is offline
Banned
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Dec 1999
Location: Afghanistan
Posts: 14,378 Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)  Folding Points: 70305 Folding Title: Intermediate FolderFolding Points: 70305 Folding Title: Intermediate FolderFolding Points: 70305 Folding Title: Intermediate FolderFolding Points: 70305 Folding Title: Intermediate Folder
Time spent in forums: 2 Months 3 Weeks 6 Days 22 h 12 m 4 sec
Reputation Power: 1784
Send a message via ICQ to Sepodati Send a message via Yahoo to Sepodati
Instructions for installing PHP:
Quote:
To use the ISAPI module, do the following:

*

If you don't want to perform HTTP Authentication using PHP, you can (and should) skip this step. Under ISAPI Filters, add a new ISAPI filter. Use PHP as the filter name, and supply a path to the php4isapi.dll / php5isapi.dll.
*

Under 'Home Directory', 'Virtual Directory', or 'Directory', do the following:
*

Change the Execute Permissions to 'Scripts only'
*

Click on the 'Configuration' button, and choose the Application Mappings tab. Click Add and set the Executable path to the appropriate ISAPI DLL. An example PHP 5 value is: C:\php\php5isapi.dll Supply .php as the extension. Leave 'Method exclusions' blank, and check the 'Script engine' checkbox. Now, click OK a few times.
*

Stop IIS completely (NET STOP iisadmin)
*

Start IIS again (NET START w3svc)

That's what I was talking about.

Whether you're logged in as Admin or not doesn't matter. PHP run as the IIS user, which is not or should not be Admin.

Don't use the installer, do it manually.

---John Holmes...

Reply With Quote
  #7  
Old July 12th, 2005, 01:39 PM
bdreyer's Avatar
bdreyer bdreyer is offline
His name is Robert Paulson!
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Feb 2005
Location: Paper Street
Posts: 2,692 bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 3 Days 4 h 10 m 43 sec
Reputation Power: 128
Quote:
Originally Posted by joeshmo
tell me about it. this is not user friendly at all.

Here is the thing, I have a seperate test box with server 2003 (no service pack) that I setup a few months ago (painstakingly then as well) with PHP 4.3.1 manual install and I used it as I guess ISAPI (pointed IIS to .dll files) and that works. On this new server box (same setup but with server 2003 SERVICE PACK 1), I tried mimicking the settings and its not working. I have since uninstalled PHP altogether and would like to wait for instructions and try again from scratch. I will try the CGI method if that works. point me in the direction please.

Either method should work, you are probably experience a slight configuration issue with IIS or the .ini file... I can try and walk you through it. Let's do the manual installation, it's much more secure. (as a side note, I am in the process of installing another win2k3 server now(just put in the PID), and once I have it all ready, I will be installing php...)
1-Copy all the files to a directory (PHP)
2-add that directory to your path statement (Environment variables...)
3-move all files in the dll and sapi folders up one level to the main folder (really you only have to move the ones you need, but do them all for now unless you know which ones you need) (php4isapi.dll, php4ts.dll
4-rename php.ini-recommended to php.ini and step through the file to adjust it for your configuration... (cgi.force_redirect = 0; email settings, etc...)
5-Create a registry key HKEY_LOCAL_MACHINE\SOFTWARE called PHP and then create a new string value called IniFilePath and set that to the folder where the php.ini file is kept.
6- Make sure that the php.ini file is readable by the IUSR_<Machine_name> account (or whatever other account you have specified) you can do this by explicitly assigning it, or giving everyone read permission.
PHP is now set up, now we have to configure IIS (You should be able to run your php_info script from the command line... try typing "php <name of your script>.php" at the command line)
7- First, add a new web service extension, let's do the ISAPI module as it's supposed to give better performance... Right click the web service extensions folder in IIS management, and add a new extension... give it a name, and provide the path to the php4isapi.dll by adding the required files.
8- Make sure the extension is allowed
9- Right click the websites folder and click properties, under ISAPI filters, add a new ISAPI filter. use php as the filter name and supply a path to the php4isapi.dll
10- Under "Home Directory", click on the 'Configuration" buttion, add a new entry to the Application Mappings. provide the path to php4isapi.dll as the executable and .php as the extension (note that you can add others here to .phtml, .php4, whatever you want.), check the script engine box.
11- Stop IIS and then restart it (Command line NET STOP IISADMIN)

Now everything is set up... make sure that the website you are trying to use allows scripts... (Home directory execute permissions must be set to scripts only or higher...)

If you still have problems, you may need to run a little vbscript I found... not all installations have to do it... try this stuff and see what happens... post back with problems.

Reply With Quote
  #8  
Old July 12th, 2005, 01:42 PM
Sepodati's Avatar
Sepodati Sepodati is offline
Banned
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Dec 1999
Location: Afghanistan
Posts: 14,378 Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)  Folding Points: 70305 Folding Title: Intermediate FolderFolding Points: 70305 Folding Title: Intermediate FolderFolding Points: 70305 Folding Title: Intermediate FolderFolding Points: 70305 Folding Title: Intermediate Folder
Time spent in forums: 2 Months 3 Weeks 6 Days 22 h 12 m 4 sec
Reputation Power: 1784
Send a message via ICQ to Sepodati Send a message via Yahoo to Sepodati
Quote:
Originally Posted by bdreyer
IUSR_<Machine_name>
Ooops. I messed up the name above.

---John Holmes...

Reply With Quote
  #9  
Old July 12th, 2005, 02:26 PM
joeshmo joeshmo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 9 joeshmo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m 29 sec
Reputation Power: 0
Quote:
Originally Posted by bdreyer
Either method should work, you are probably experience a slight configuration issue with IIS or the .ini file... I can try and walk you through it. Let's do the manual installation, it's much more secure. (as a side note, I am in the process of installing another win2k3 server now(just put in the PID), and once I have it all ready, I will be installing php...)
1-Copy all the files to a directory (PHP)
2-add that directory to your path statement (Environment variables...)
3-move all files in the dll and sapi folders up one level to the main folder (really you only have to move the ones you need, but do them all for now unless you know which ones you need) (php4isapi.dll, php4ts.dll
4-rename php.ini-recommended to php.ini and step through the file to adjust it for your configuration... (cgi.force_redirect = 0; email settings, etc...)
5-Create a registry key HKEY_LOCAL_MACHINE\SOFTWARE called PHP and then create a new string value called IniFilePath and set that to the folder where the php.ini file is kept.
6- Make sure that the php.ini file is readable by the IUSR_<Machine_name> account (or whatever other account you have specified) you can do this by explicitly assigning it, or giving everyone read permission.
PHP is now set up, now we have to configure IIS (You should be able to run your php_info script from the command line... try typing "php <name of your script>.php" at the command line)
7- First, add a new web service extension, let's do the ISAPI module as it's supposed to give better performance... Right click the web service extensions folder in IIS management, and add a new extension... give it a name, and provide the path to the php4isapi.dll by adding the required files.
8- Make sure the extension is allowed
9- Right click the websites folder and click properties, under ISAPI filters, add a new ISAPI filter. use php as the filter name and supply a path to the php4isapi.dll
10- Under "Home Directory", click on the 'Configuration" buttion, add a new entry to the Application Mappings. provide the path to php4isapi.dll as the executable and .php as the extension (note that you can add others here to .phtml, .php4, whatever you want.), check the script engine box.
11- Stop IIS and then restart it (Command line NET STOP IISADMIN)

Now everything is set up... make sure that the website you are trying to use allows scripts... (Home directory execute permissions must be set to scripts only or higher...)

If you still have problems, you may need to run a little vbscript I found... not all installations have to do it... try this stuff and see what happens... post back with problems.


Ok, I did this:

1)Check. (extracted the zip for 4.3.1 to c:\php)

2)user variable or system variable? can you be more specific?

3)Check

4)What specifically should I change in this configuration? I don't want to do anything fancy, just ensure generic php script will display.

5)Check
6)Check (gave everyone read access on NTFS)
7)Check
8)Check
9)Check
10)check
11)check

Ok well I skipped steps 2 and 4, but it worked anyway...Not sure why all the instructions cannot be that clear. Thanks for your help.

Reply With Quote
  #10  
Old July 14th, 2005, 12:26 PM
bdreyer's Avatar
bdreyer bdreyer is offline
His name is Robert Paulson!
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Feb 2005
Location: Paper Street
Posts: 2,692 bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level)bdreyer User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 3 Days 4 h 10 m 43 sec
Reputation Power: 128
I'm glad you figured it out...

I just had a hell of a time installing php on my new server... Obviously the IUSR account has to have permissions to read the php directory, but I was still getting access errors... after much thought, and searching I found that the default app pool user has to have permission to that directory as well (I never had to deal with this before on my other servers...) But once I add the IWAM_<machine_name> account to be able to read C:\php everything is hunky dory...

I wonder why I never had to deal with it before.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationIIS > How to install PHP on IIS 6.0 for server 2003??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


F