FastCGI, PHP and Web Installer -- Help pleaseRSS

11 replies

Last post Mar 23, 2010 05:10 PM by don.raman

  • FastCGI, PHP and Web Installer -- Help please

    Mar 18, 2010 05:41 PM|rvenoski|LINK

    I'm trying to get PHP working under IIS7:


    - I configured IIS 7 and it works.

    - I downloaded php-5.3.2-nts-Win32-VC9-x86.msi and install.  It said it installed.

    - I use the 2009-08-25-PhpOnWindowsTrainingKit.exe.  Exercise 1: Tasks 1 and 2 are complete. (Reference MS Migrating PHP Applications to IIS 7.0)  Tasks 3 (Enable IIS to serve PHP applications via FastCGI fails with "c:\PHP\php-cgi.exe' is not a recognized native module. Specify at least one enabled native module."

    - I try to download on install the latest FastCGI.  It says I have to install the Web Installer.  I run the installation for Web Platform Installer 2.0 and I get the message "The product that your are trying to install is not supported on your operating system."

     My system is Vista Ultimate 6.0, SP2, MS SQL Server installed, IIS 7 installed.  Any suggestions?

    IIS 7 PHP FastCGI failure Web Platform Installer 2.0 ERROR

  • Re: FastCGI, PHP and Web Installer -- Help please

    Mar 18, 2010 06:35 PM|don.raman|LINK

    Hi,

    rvenoski

    I try to download on install the latest FastCGI.  It says I have to install the Web Installer.  I run the installation for Web Platform Installer 2.0 and I get the message "The product that your are trying to install is not supported on your operating system."

    IIS FastCGI is built into VIsta OS. You don't need to download anything. The one you are trying to download is for Windows Server 2003 and Windows XP and hence you are getting the error. You can configure IIS FastCGI following the article at http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/.

    If you want to use WPI, just install PHP from WPI (but WPI offers PHP5.2.13 as of now and you will need to delete/uninstall the previous PHP installation). WPI will automatically configure IIS FastCGI. You can follow my blog at:

    If you want to further upgrade to PHP 5.3.2 follow the below blog

    Thanks,

    Don.

  • Re: FastCGI, PHP and Web Installer -- Help please

    Mar 19, 2010 10:15 AM|rvenoski|LINK

    I uninstalled PHP and copied the zipped binaries to "C:\PHP\".  In the procedure described in http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-7/, I get to the IIS Handler Mappings step to enter the *.php handler.  After entering the handler information, I get the error message " 'C:\PHP\php-cgi.exe' is not a recognized native module. Specify at least one enabled native module."

    When I try to run a php test module test.php from IE that contains "<?php phpinfo(); ?>, I just get the text from the file on my browser window.  So, PHP is not running.

    Any suggestions?

     

    error PHP FastCGI IIS

  • Re: FastCGI, PHP and Web Installer -- Help please

    Mar 19, 2010 01:28 PM|don.raman|LINK

    Hi Rvenoski,

    Unless you have a valid handler mapping for servinf files with .php extension, it goes to StaticFileHandler. In IIS7 the handler mappings are searched in the same order as they appear in the handler mapping section of IIS Manger. Since you do not have an appropriate handler mapping for handling .php file, it is being treated as static file and hence the behaviour you are seeing.

    Now let's get back to the error. Are you running 64-bit windows? If yes, your application pool should be set to enable 32 bit application. This can be done by:

    • <div mce_keep="true">Open IIS Manager</div>
    • <div mce_keep="true">Click on Application Pools on the left hand side pan</div>
    • <div mce_keep="true">Click the application pool you are using</div>
    • <div mce_keep="true">Click on 'Advanced Settings' in the Actions pane</div>
    • <div mce_keep="true">In the general section ensure that Enable32bitapplication is set to True.</div>

    If this doesn't work, please use Microsoft Web Platform Installer to install PHP. Undo what all you have done and use WPI.

    Thanks,

    Don.

  • Re: FastCGI, PHP and Web Installer -- Help please

    Mar 19, 2010 05:55 PM|rvenoski|LINK

    I'm running 32 bit Vista.  I already tried to install PHP.  The installation requires that Microsoft Web Platform Installer be installed.  When I try to install the Microsoft Web Platform Installer 2.0, I get the error message:

     "The product that you are trying to install is not supported on your operating system."

    I'm using Vista Ultimate, SP2.

  • Re: FastCGI, PHP and Web Installer -- Help please

    Mar 19, 2010 06:33 PM|don.raman|LINK

    WPI is very much supported on Vista. Please download it from http://www.microsoft.com/web/downloads/platform.aspx.

    Thanks,

    Don.

  • Re: FastCGI, PHP and Web Installer -- Help please

    Mar 22, 2010 02:02 PM|rvenoski|LINK

    Finally got Microsoft Web 2.0 Installer to work.  My latest error:

    HTTP Error 500.21 - Internal Server Error

    Handler "PHP_via_FastCGI" has a bad module "FastCgiModule" in its module list

    I'm try running a test PHP module [<?php phpinfo(); ?>] from IE.  I cannot seem to get PHP and IIS to talk.  Any suggestions?

    IIS 7 FastCGI failure

  • Re: FastCGI, PHP and Web Installer -- Help please

    Mar 22, 2010 02:24 PM|don.raman|LINK

    Please follow http://blogs.iis.net/donraman/archive/2009/11/15/troubleshooting-php-installation-on-windows.aspx for further troubleshooting and paste the output here. Also make sure that you have CGI installed properly. Check if everythign is correctly configured as per http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-7/.

    Thanks,

    Don.

  • Re: FastCGI, PHP and Web Installer -- Help please

    Mar 22, 2010 06:46 PM|rvenoski|LINK

    The results from the two scripts:

    Microsoft Windows [Version 6.0.6002]
    Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

    C:\Users\Ray>cscript.exe C:\inetpub\AdminScripts\adsutil.vbs GET w3svc/DefaultDo
    c
    Microsoft (R) Windows Script Host Version 5.7
    Copyright (C) Microsoft Corporation. All rights reserved.

    DefaultDoc                      : (STRING) "Default.htm,Default.asp,index.htm,in
    dex.html,iisstart.htm,default.aspx,index.php"

    C:\Users\Ray>cscript.exe C:\inetpub\AdminScripts\adsutil.vbs GET w3svc/ScriptMaps | findstr php

    C:\Users\Ray>

     -------------------------------

    Since the second script returned nothing, Don said I should doubt my installation.  In the C:\Windows\System32\inetsrv directory, I do not have the following files:  fcgiext.dll, fcgiext.ini and fcgiconfig.js.  However, Don doesn't say where there files came from.

  • Re: FastCGI, PHP and Web Installer -- Help please

    Mar 22, 2010 06:54 PM|don.raman|LINK

    Hi,

    rvenoski

    Since the second script returned nothing, Don said I should doubt my installation.  In the C:\Windows\System32\inetsrv directory, I do not have the following files:  fcgiext.dll, fcgiext.ini and fcgiconfig.js.  However, Don doesn't say where there files came from.

    Hmmm. I believe you are on WIndows VIsta. Right? Why are you following part of my blog which talks about Windows 2003/Windows XP? Please follow the part which talks about Vista. So run 'appcmd' not adsutil.vbs. Also did you check that everything is appropriate as per article at http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-7/

    Thanks,

    Don.

  • Re: FastCGI, PHP and Web Installer -- Help please

    Mar 23, 2010 11:49 AM|rvenoski|LINK

    This should not be this difficult.  I went through your trouble shooting procedures at:

    http://blogs.iis.net/donraman/archive/2009/11/15/troubleshooting-php-installation-on-windows.aspx

    Everything is consistent with your analyses until I try and invoke the test.php from a browser.  I can invoke the test.php from the command line, and it works.  However, the browser gives me the error:

     HTTP Error 500.21 - Internal Server Error
    Handler "PHP_via_FastCGI" has a bad module "FastCgiModule" in its module list

    I double checked the installation procedures in:

    http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-7/

    Is the moon in the wrong phase?

  • Re: FastCGI, PHP and Web Installer -- Help please

    Mar 23, 2010 05:10 PM|don.raman|LINK

    I worked offline with Ray and his problem is fixed. His machine went through a lot of upgrade from XP to Vista Home and from Vista Home to Vista Ultimate etc. Somehow the upgrade messed up the FastCGI installation. I simply removed CGI (by going to Turn On/Off Windows feature in Control panel) and re-installed it. Again re-did the handler mapping for .php files and all is well.

    Ray was getting the Bad Module error because though WPI set .php handler and mapped it to FastCGI module, the module was not there and was missing though the system was showing FastCGI installed.

    Thanks,

    Don.