IIS 7 and Above
Problems with PHP and IIS 7.5
Last post Jan 25, 2012 08:55 AM by HCamper
Jan 24, 2012 11:11 PM|mlp_1966|LINK
We are running Windows 2008 Server 64 bit R2, SQL Server 2008 Express, with Clasic ASP happily. We got ASP.Net running too and wanted to get PHP going before depoyment. We have used the WPI deployment to install: PHP versions 5.2.17, 5.2.14, and now 5.3.9,
and PHP Manager. After installation we check the php manager and we are unable to get any info from the diagnostic phpinfo(), instead we get: "Navigation to the webpage was canceled" - a time out?? When index.php is hit by a browser from a client machine,
the following appears:
Any help would be really appreciated...
Jan 24, 2012 11:21 PM|HCamper|LINK
Yes that's starting to be an issue:
Windows 2008 Server R2 and X64-Bit using PHP versions 5.2.17, 5.2.14 and now 5.3.9 and PHP Manager.
You have to remove and clean up the previous installs. Then use the Web Platform Tool.
Yes try this http://forums.iis.net/t/1186168.aspx PHP update to 5.3.9.
Look at the http://forums.iis.net/t/1185911.aspx "Problems after installing PHP 5.3.8 User Thread"
Jan 25, 2012 02:28 AM|mlp_1966|LINK
Many thanks for the reply and time saving information Martin. We are in debt :)
What concerns us, would be when we have code in PHP and we update the PHP version (i.e. had the server been in production), then innocently attemplting to update a security hole in php 5.?.? and finding ourselves with a non-functioning installation of PHP
(until we unistall and reinstall PHP!!!). Sigh..
What would be the best source of information for carrying out manual or preferably automatic unistal-ation of PHP then?
Jan 25, 2012 02:53 AM|HCamper|LINK
Thanks for the Kudos :)
In a Production server PHP the latest updated version is the best way to keep secure.
For the PHP updating and install information hope this helps.
This can be complex for the choices "Menu" selections you want and need and the version of Windows.
Some History and changes http://forums.iis.net/t/1181076.aspx "PHP Version 5.3.8 not available" and some of the changes.
A) The PHP install can be from the .zip archive at the PHP for windows download to do an install. Works lots of time.
B) The PHP install can be from a zip archive using at files at the Source Forge site using the Web Platform Tool. Works automatic.
C) The PHP install can be from a Windows Installer at the PHP for windows download. Works using the UI or msi cmds to deploy.
D) The PHP Manager for Vista and above helps with the configuration settings & testing.
Youe can get the PHP Manager using the Web Platform Tool latest version.
The PHP Manager Project is at Code Plex you can get the installers for latest version.
Note: Many of the installs require reading and accepting the Eula and terms.
Personal choice: Is the Windows Installer versions for deploying.
Jan 25, 2012 05:31 AM|mlp_1966|LINK
Many thanks. Thus we need to unistall all versions and install 3.5.9. I will go the Windows Installer way, BUT what is the best way to unistall then PHP versions: 5.2.17, 5.2.14, and 5.3.9 (or if there is an authoriative page that would be ok too)?
Jan 25, 2012 05:38 AM|HCamper|LINK
What is the best way to unistall then PHP past versions 5.3.XX authoriative page lets make one
http://forums.iis.net/t/1185911.aspx Problems after installing via the Web Platform.
Jan 25, 2012 05:55 AM|mlp_1966|LINK
Many thanks for walking through this one with us. 5.2.14 was installed using windows installer, so that is out of the way easily (I guess that's why your recommendation is to use the Windows Installer). Now
http://forums.iis.net/t/1185911.aspx reads in a step by step fashion:
1. Back-up the php.ini
### which defaults to "C:\Program Files (x86)\PHP\php.ini"
2. Stop the IIS Web Server remove the settings for PHP
### thus remove "C:\Program Files (x86)\PHP\php.ini"
check the C:\Windows and C:\Windows\System folders for the ini files.
### no php.ini files there
for the new install and the remains of manual install.
4. Then check the removal of the PHP using the Web Platform Tool. You should restart the Windows System.
### I hit the wall here. The Web Platform Installer (7.1.1070.01) does not provide for uninstalling any PHP version. It does list 3.5.9 but since it is installed the option is marked as installed and dimmed. Am I at the right place?
5. After you have restarted install the PHP with the Web Platform Tool install the PHP SQL Driver Extensions.
6. Also install PHP Manager
Jan 25, 2012 06:09 AM|HCamper|LINK
The Snag might in 4. image
Reference IIS Server http://www.iis.net/ConfigReference/system.webServer/fastCgi "Handlers" for php and the mapping for .php.
Jan 25, 2012 06:36 AM|mlp_1966|LINK
OK, those are also our server php file handling mappings (I think the WPI created them and labelled them as PHP52_via_FastCGI and PHP53_via_FastCGI - they were left as is). In the website settings in the "Set Up" of the PHP manager, file and folder handlings
Jan 25, 2012 06:43 AM|HCamper|LINK
Per Site Configurations: "PHP52_via_FastCGI" or "PHP53_via_FastCGI"
http://learn.iis.net/page.aspx/745/enable-per-site-php-configuration-on-iis-60-and-iis-7-and-above/ per-site-php -config.
PHP Secure you settings
Jan 25, 2012 07:08 AM|mlp_1966|LINK
Apologies, I got lost somewhere along the line. Would I be correct to say that: the execution of "http://---------/index.php" which results in a: "HTTP Error 404.0 - Not Found" Error with "Detailed Error Information":
Module IIS Web Core Notification MapRequestHandler Handler PHP53_via_FastCGI
Error Code 0x80070002 Requested URL http://---------:80/index.php
Physical Path C:\web-----\--------\index.php Logon Method Anonymous Logon User Anonymous
is caused because of the update, with PHP53_via_FastCGI called. Thus whether the settings are per site or global bear no effect to the whole situation. Thus bringing back the question whether it is possible to remove 2.5.17 and 3.5.9. I could be wrong to
any of the above, we do appreciate your help.
Jan 25, 2012 07:36 AM|HCamper|LINK
I hope this helps:
You can remove older versions 5.2.17 and 3.5.9 this the first time for a Clean-Up.
The PATH is out side of the IIS Server:
C:\web-----\--------\index.php Logon Method Anonymous Logon User Anonymous
Website. For example:
http://learn.iis.net/file.axd?i=45 image Web Site
Website created in your IIS Manager
Contains the Handlers
http://learn.iis.net/file.axd?i=46 image IIS Manager
Then a call ( Request) URL http:// ..........:80 / index.php
IIS 7.0 defines the following HTTP status codes that indicate a more specific cause of a 404 error: 404.xx tells more.
Status SubStatus Codes Descriptions and suggestions.
at that Web Site.
http://blogs.iis.net/tomkmvp/archive/2009/04/27/troubleshooting-a-404.aspx IIS Team Tom MVP
http://support.microsoft.com/kb/943891 Status Codes
Not really good with the editor :D.
Jan 25, 2012 08:22 AM|mlp_1966|LINK
Three different log lines from a long long day :)
ASPX: 2012-01-25 03:22:08 xxx.xxx.x.x GET /test.aspx - 80 - xxx.x.xxx.xx Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:9.0.1)+Gecko/20100101+Firefox/9.0.1 200 0 0 218
ASP: 2012-01-25 04:00:48 xxx.xxx.x.x GET /index.asp - 80 - xxx.x.xxx.xx Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:9.0.1)+Gecko/20100101+Firefox/9.0.1 200 0 0 358
PHP: 2012-01-25 12:00:12 xxx.xxx.x.x GET /index.php - 80 - xxx.x.xxx.xx Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:9.0.1)+Gecko/20100101+Firefox/9.0.1 404 0 2 46
1. You can remove older versions 5.2.17 and 3.5.9 this the first time for a Clean-Up. <------- Yes, but how? :)
2. The PATH is out side of the IIS Server: <---- Yes, ASPX and ASP operate, so I was hoping php would also operate.. Can the php server access a website that has been placed outsite the standard installation directory (just like ASPX and ASP, index.php and
index.asp and index.aspx reside in the same directory)?
3. Based on the log its a 404.0 ! file not found?? For what is worth, I moved the file into inetpup/wwwroot, changed the folder location of the site but there is no change in the outcome, or type of error.
Jan 25, 2012 08:55 AM|HCamper|LINK
Yep, I hear you :D.
The PHP and IIS Server can use SiteA and SiteB outside the standard installation directory
You do have to stop the the services which may stiil be using files than includes the IIS Admin Service.
Do you have SiteA "index.php" then SiteB "index.php" to go with http: // SiteA then http:// SiteB ?
BTW: IIS 200 status code means ok.
The IIS log 404.0 error file could be either SiteA "index.php" or SiteB "index.php" are set as the "Default"
http://www.iis.net/ConfigReference/system.webServer/defaultDocument documents include "index.php"
He has http://forums.iis.net/t/1185911.aspx Dizz