locked
PHP not happy, not sure if FastCGI is functional RRS feed

  • Question

  • User650730110 posted

    Running Win 2008 R2 Server (64-bit)., Running II7

    Tried installing MS Web Platform Installer, thinking it would provide PHP support, but just kept getting error messages.  

    So then installed 32-bit php (version 5.3.1) from PHP's official site.

    php -info works, but browser access fails.

    First I got "add handler" message, so tried to do that using Microsoft Instructions here:

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

    There was no php-cgi.exe to map to, so I mapped  *.php to php.exe instead

    Also could not execute all steps as could not find applicationHost.config in location referred to in the article, which seems to be written for 32-bit machine instead of 64-bit.

    Also noticed that CGI-exe and ISAPI-dll are both disabled in "Handler Mappings".  Is that bad?

    Now I get this HTTP 500.0 error:

    C:\Program Files (x86)\PHP\php.exe - The FastCGI process exited unexpectedly.  Error code: 0x00000000

     Most likely causes:

  • IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
  • IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
  • IIS was not able to process configuration for the Web site or application.
  • The authenticated user does not have permission to use this DLL.
  • The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.

     We are running Classic ASP, so there is no web.config file.  Do I need to add one?  If so, what should it contain?

    Also, how would I verify the permissions on the .dll ?

    Per this article, I have confirmed installation of .NET Extensibility Feature:

    http://forums.iis.net/t/1146942.aspx

    Thanks for your help!

Friday, January 29, 2010 5:02 PM

Answers

All replies

  • User-1405480850 posted

    Hi,

    Tried installing MS Web Platform Installer, thinking it would provide PHP support, but just kept getting error messages.  

    What was the error message you were getting?

    There was no php-cgi.exe to map to, so I mapped  *.php to php.exe instead

    That's wrong. PHP-CGI.exe is very much part of PHP MSI. Can you tell me the link from where you installed PHP?

    Thanks,

    Don.

    Friday, January 29, 2010 5:09 PM
  • User650730110 posted

    Hi Don - Thanks for your help.  Replies below. 

    Hi,

    Tried installing MS Web Platform Installer, thinking it would provide PHP support, but just kept getting error messages.  

    What was the error message you were getting?

    It was looking for a dll I think.  Kept saying I needed to download another file.  At that point I figured the MS Platform Installer was maybe incomplete and wasn't intended to actually provide PHP support so I moved on to the direct install.  Sorry I didn't write down the name, best I can do is it started with "M" I think, but I know that info is useless. 

     

    There was no php-cgi.exe to map to, so I mapped  *.php to php.exe instead

    That's wrong. PHP-CGI.exe is very much part of PHP MSI. Can you tell me the link from where you installed PHP?

    Sure,  http://windows.php.net/download/

    I downloaded the installer version.

    It asked me if I wanted to install a web server, and I said no.  Everything else I took was the default since that seemed to be the advice of others on other sites and seemed like the logical thing to do. 

     Should I re-install?

    Thanks,

    Don.

    Friday, January 29, 2010 5:55 PM
  • User-1405480850 posted

    First of all undo whatever you have done till now. Definitely uninstall PHP. Now go back and install Microsoft Web Platform Installer. WPI needs .NET framework to run and if it asks to download .NET you should go ahead and do so. Please follow my blog at http://blogs.iis.net/donraman/archive/2009/10/07/installing-php-on-windows.aspx to install PHP from WPI.

    In case you are having problem please do the install troubleshooting using my blog at http://blogs.iis.net/donraman/archive/2009/11/15/troubleshooting-php-installation-on-windows.aspx. While reporting problem please run commands I have asked in my blog and paste the output of it.

    Thanks,

    Don.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Friday, January 29, 2010 6:00 PM
  • User650730110 posted

    I just looked at my installation in the Repair/remove programs in Control Panel.

    Where it says:  Select the webserver you wish to set up:

    One of the options was to install IIS FastCGI

    I thought they were saying they were going to install a new web server.  But from your question, I guess the wording means to configure IIS to add FastCGI.  So I chose that repair option and now we are able to get the phpinfo page.

     Thank you!!! 

     

    Friday, January 29, 2010 6:06 PM
  • User650730110 posted

    Thanks for your help.

    Since I can now get to the phpinfo page from my browser, do you think I should uninstall everything and reinstall again just in case?

    Friday, January 29, 2010 6:08 PM
  • User-1405480850 posted

    I hope your handler mapping is pointing to php-cgi.exe now and you have index.php added in the default document. I also assume that you have Non Thread Safe version of PHP running.

    See if you will uninstall and reinstall using WPI a good thing is that WPI configures commonly used extension on it's own.

    Thanks,

    Don.

    Friday, January 29, 2010 6:14 PM
  • User-1405480850 posted

    I forgot one thing. I am noting that you are running PHP 5.3.1. WPI will install PHP 5.2.12. So if you want 5.3.1 you can as well ignore installing it through WPI.

    Thanks,

    Don.

    Friday, January 29, 2010 6:15 PM
  • User650730110 posted

    Okay, thanks.

    Just for grins, I uninstalled php 5.3.1, then reinstalled php via WPI.  This time it worked. 

    Then I remembered that last time I installed using WPI, it was with a bunch of other items at the same time, and one item couldn't install because of failing the sha key - I think it was the SEO toolkit. 

    So I'm guessing something got messed up for php during the failed install process.

    Anyway, now I know how to do it and I'll check the requirements for my other pkg before I decide whether to bother to upgrade or not.

     Thanks again, and most especially for the speedy response!!!!

    Friday, January 29, 2010 6:29 PM