Partner and Community Forums
Install problem Windows 7 PHP5.2.11
Last post Nov 03, 2009 01:26 AM by don.raman
Nov 02, 2009 11:39 PM|dbay55|LINK
I previously had a manual install of 5.3 on the computer which was not working (just blank screens), then I installed 5.2.11 via the Web Platform Installer from this website. Now when I point to the test file in localhost, I get HTTP error 404.0 error code
0x80070002, module IIS Web Core, MapRequestHandler, StaticFile, anonymous user and logon method.
Again, this is Windows 7 IIS7.5.
Any help is appreciated.
Nov 02, 2009 11:45 PM|don.raman|LINK
Did you remove PHP 5.3 completely? I believe there are still something left which is creating the problem.
Can you run the below command:
%WINDIR%\system32\inetsrv\appcmd.exe list config /section:fastcgi /text:*
%WINDIR%\system32\inetsrv\appcmd.exe list config /section:handlers /text:* | findstr /i PHP
And paste the output of each of these.
Also open IIS Manager (press Windows key + R and type 'inetmgr'). Please browse to 'Handler Mappings' section and see what is your mapping for *.php. My guess is that you still have stale handler mapping somewhere.
You should also run 'C:\Program Files\PHP\php-cgi.exe' <path to a simple PHP file> and ensure that the output is correct. This will validate at least the fact that PHP is running fine.
Nov 03, 2009 12:09 AM|dbay55|LINK
C:\>%WINDIR%\system32\inetsrv\appcmd.exe list config /section:fastcgi /text:*
ERROR ( message:Configuration error
Line Number: 0
Description: Cannot read configuration file due to insufficient permissions
?? I am logged in Admin, not sure what to make of this.
and no output from %WINDIR%\system32\inetsrv\appcmd.exe list config /section:handlers /text:* | findstr /i PHP
Handler mapping for *.php is the same as before "C:\Program Files (x86)\PHP\php-cgi.exe", FastCgiModule, with restriction to invoke handler only if request is mapped to file or folder.
Finally, on your last suggestion, php-cgi.exe is missing from my PHP folder.
Nov 03, 2009 12:28 AM|don.raman|LINK
Try running these from an elevated command prompt. Both the command should print valid output.
Seems like your installation is wrong. Now do one thing. Please uninstall whatever you have installed and ensure that system is in a clean state. Try to remove IIS FastCGI too. This article explains how to turn it ON
http://technet.microsoft.com/en-us/library/cc753077(WS.10).aspx. Just uncheck the 'CGI' box and it should get uninstalled.
Now follow the blog at
http://blogs.iis.net/donraman/archive/2009/10/07/installing-php-on-windows.aspx to make PHP 5.2.11 running. If you want to use PHP5.3 you should follow the blog at
This should solve your problem. Let me know how it goes.
Nov 03, 2009 12:31 AM|don.raman|LINK
You can uninstall PHP by going to Control Panel-->Uninstall a program and uninstall PHP. You will have an entry if you have used PHP MSI to install it. If not just delete the folder.
Nov 03, 2009 12:49 AM|dbay55|LINK
I started the uninstall and re-install after not finding the exe.
I still get the same error on the http, but the command line works with the exception that PHP sees none of the dll's.
Just trying to get 5.2.11 running now.
Nov 03, 2009 12:57 AM|don.raman|LINK
Did you install PHP from WEBPI following my blog. After you uninstalled PHP please remove stale PHP.INI file. Start from utmost clean state with no trace of PHP of fastCGI on the machine. Your PHP is not finding the DLL because they are loaded as part of
PHP.INI but not present in C:\Program Files (X86)\PHP\ext folder.
Nov 03, 2009 01:01 AM|don.raman|LINK
One more thing, first fix the command line. Because if command line is not working HTTP will never work. So do this:
Nov 03, 2009 01:23 AM|dbay55|LINK
Looking into the errors more, the dll's being flagged were not present in the file set. So I commented them out in the php.ini.
Everything is running now. Thanks for suggestions which got me on track.
I am not going to upgrade to 5.3. This should be fine for me.
Now onto MySQL install...
Thanks again. Bob
Nov 03, 2009 01:26 AM|don.raman|LINK
Good to know that you are able to make PHP work. However commenting out the extensions from PHP.INI is not a great idea as sooner or later you will need them. However whenever you need to install an extension please follow the blog at