C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly [Answered]RSS

15 replies

Last post Sep 12, 2013 11:59 AM by fifernand

  • C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

    May 15, 2008 11:13 AM|c_creaney|LINK

    Hi,

    I am trying to run PHP via FastCGI on a Windows 2008 server. I followed this installation doc http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis7/ and have checked I completed the steps correclty numerous times. However when I try to execute a php page i am presented with the following error:

    HTTP Error 500.0 - Internal Server Error
    C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

    Detailed Error Information

    Module: FastCgiModule
    Notification: ExecuteRequestHandler
    Handler: PHP via FastCGI
    Error Code: 0x000000ff
    Requested URL: localhost/test.php 
    Physical Path: C:\inetpub\wwwroot\test.php
    Logon Method: Negotiate
    Logon User: Domain\user

     I had PHP working correctly without using FastCGI so im fairly sure its not the PHP installation. The only help i have found on this error is here http://blogs.iis.net/rickjames/archive/2007/10/16/fastcgi-debugging-quot-the-fastcgi-process-exited-unexpectedly-quot.aspx and as I am a novice at debugging something like this im not finding it much help.

    I have changed the applictaionhost.config file locking down most sections as this server wiil be used for hosting, but i have doubled checked that the sites attempting to run php have access to all the modules and handlers they require i.e. the FastCGI handler shown above in the detailed error information.

    Any ideas on why this error may be happening, or any simple tips for debugging it?

    I am thinking a fresh install may be my only way of fixing this?

    *****Update*****

    After reading other posts I followed  these steps mentioned by ruslany

    <div class=ForumPostContentText>

    "A possible way to isolate the problem is by running your script from the command line:

     C:\php\php-cgi.exe C:\inetpub\wwwroot\phpinfo.php

    If you get the same error then you will know that the error has nothing to do with web server or FastCGI module.

    Another thing to try is to switch php handler mapping from FastCGI to CGI and see if the error goes away. This way you will know that the error is caused by FastCGI."

    So I ran the script from the command line and it returned:

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

    PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\ext\php_gd.dll' - The specified module could not be found. in Unknown on line 0

    Hello World! 

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

    I then switched the php handler from FastCGI to CGI and tried my php page using IE which returned the "Hello World" text followed by the php warning above

    So, bar the warning it appears to be working correctly. I dont think this warning is crashing FastCGI, however ill work on fixing it just to make sure.

    </div>

     

    FastCGI process exited unexpectedly PHP IIS7 2008

  • Re: C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

    May 15, 2008 12:14 PM|c_creaney|LINK

    ok i have finally got this working, i guess these turned out to be famous last words

    "I dont think this warning is crashing FastCGI, however ill work on fixing it just to make sure."

    The error was causing FastCGI to crash, i commented out extension=php_gd.dll in my php.ini and it appears to be working correcly.

    I think ill test this a bit more just to make sure.

     I hope this can help anyone else who has the same problem.

    Thanks

     

  • Re: C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

    May 15, 2008 12:27 PM|Alex.W474|LINK

    Hello,

    It looks like PHP extension folder is incorrect in the PHP.ini and because of this PHP cannot load the library. You start PHP from C:\PHP but it search for extensions in C:\Program Files (x86)\PHP\ext\.

    Set the extension_dir directive in PHP.ini to 'C:\PHP\ext' to resolve this.issue.

    BTW, you can try the installation that is described on the following page: WITSuite.com Knowledge Base / Manual PHP install - it works ok for me.

    PHP FastCGI extensions

  • Re: C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

    Dec 18, 2008 10:06 PM|coreygo|LINK

    I hit this but then I ran into this page: http://www.thewebhostinghero.com/tutorials/windows2008-iis7-fastcgi-php.html. Which actually noted that a registry entry should be added for PHP: HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath = C:\PHP. After I created this, I got the Hello World and PHPInfo pages to run correctly.

  • Re: C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

    Jul 18, 2010 06:46 AM|stuffmasterperson|LINK

     actually the problem in PHP.download php setup and zip file.first install setup and check extension directory and mysqli extension .if it is not work extract the zip copy the all file and paste .use the php.ini file from zip file check extension directory and uncomment mysqli extension

    http://www.technoweblog.com/featured/installing-wordpress-in-iis7

  • Re: C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

    Jul 20, 2010 10:16 PM|Ohrizon|LINK

    I spent all day trying to debug this issue and couldn't get it to work until I found your recommendation to run php-cgi from the command line. Thanks!

    For everyone else, my specific issue was that the php-cgi.exe was trying to access browscap.ini in the systems folder and didn't have the appropriate permissions. I was trying to install wordpress on a new server. Everything worked perfectly if I set it up through plesk to run ISAPI, but whenever I tried FastCGI I would get this error.

    Mike - www.ohrizon.com

    FastCGI plesk ISAPI

  • Re: C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

    Oct 14, 2010 06:16 PM|jansanman|LINK

    I've spent more than all day trying to resolve this without any luck. I've been through dozens of different sites and have followed their instructions very carefully without getting this error to go away. I'm still getting the following: HTTP Error 500.0 - Internal Server Error c:\php\php-cgi.exe - The FastCGI process exited unexpectedly Detailed Error Information Module FastCgiModule Notification ExecuteRequestHandler Handler PHP_via_FastCGI Error Code 0x000000ff Requested URL http://localhost:80/index.php Physical Path C:\inetpub\wwwroot\index.php Logon Method Anonymous Logon User Anonymous I'm about ready to give up.
  • Re: C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

    Oct 24, 2010 10:26 PM|FEKMGMT|LINK

    Hi Jansaman I've had a similar error that has been driving me insane. Basically I installed PHP through windows live installer - still got error. Installed PHP manually through ZIP file - still got error. More or less, I've traced the error back to enabling extensions with FAST-CGI. As soon as I enable an extension in the PHP.ini file, I get the 500 error. Is this similar to what you're getting? Perhaps its a bug?
  • Re: C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

    Jan 05, 2011 03:57 AM|iisbond|LINK

    Hello jansanman
    I am getting same error...is there any lucky...you got any solution?

     

  • Re:IIS 7-Forums:-FastCGI-"C:\PHP\php-cgi.exe"-PHP-"The FastCGI process"- "exited- "unexpectedly",...

    Jan 05, 2011 04:46 AM|HCamper|LINK

    Hello, 

    "I am trying to run PHP via FastCGI on a Windows 2008 server.

    I followed this installation doc learn IIS Net"  

    and have checked

     I completed the steps correclty numerous times.

    However when I try to execute a php page i am presented with the following error:

    HTTP Error 500.0 - Internal Server Error
    C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

    Detailed Error Information

    Module: FastCgiModule
    Notification: ExecuteRequestHandler
    Handler: PHP via FastCGI
    Error Code: 0x000000ff
    Requested URL: localhost/test.php 
    Physical Path: C:\inetpub\wwwroot\test.php
    Logon Method: Negotiate
    Logon User: Domain\user"

    These are the Steps and methods,

    The setup for running php scripts is a four part procedure.

    A) The first part is telling the web server where to find the "php.exe" which will execute the code.

    B ) The second part is telling the web server how to handle the "*.php" files which will be passed to the "php-cgi.exe".

    C) The third part is telling the web server how this is going to work which is a "Handler Mapping".

    D) The fourth part is telling the web server it will use "Fast CGI" as a safe method to execute the code.

    The steps are open the IIS Manager and find the "Panel" marked "Handler Mappings".

    While in the "Handler Mappings" select create a new mapping.

    For the new mapping select the wildcard "*.php" then for the "executtable" browse to where the "php-cgi.exe" is located

                enclose the executable name in double quotes ""php-cgi.exe"" then

                  select in the method to use select the "Fast-CGI"

                         then go to the "Restrictions" "Button" then select each "Tab"      

               Mapping ( file and the check box selected)

              Access( file check box).

              Verbs (type in GET,HEAD,POST).

    Close the "button" and the dialog it then will prompt with do you want to all this press the "yes".

    Exit the "Handler Mapping" dialog.

    While still in the IIS manager find the "Panel" titled "Fast CGI" open the "panel" and browse to where

    the "php-cgi.exe" is located. You then will have an additional dialog that has a label "Monitor Changes to file"

    select this option and browse to where the "php.ini" is located.

    After making all the changes above restart the web server.

    The steps here are just the basics to get the mapping correct.

    You should be able to execute php code at the server

    Cheers :)

    If you have more issues post your questions to this thread.

    Martin :)

    <div class=ForumPostContentText>

     

    </div>

    PHP FastCGI IIS7 php fastcgi 500 IIS7 fastCGI Installation IIS7 FastCGI Installation Download Broken Link FastCGI process exited unexpectedly PHP IIS7 2008 PHP FastCGI extensions php fastcgi error iis7 fastcgi fastCGI error fastcgi module warning error 500 IIS 7.0 IIS7 fastcgi Installation vista SP1 PHP php fascgi fastCGI php mysql fascgi IUSR IIS_USR permission php FASTCGI IUSR IIS_USR permission php iis7 fastcgi 500-error php fastcgi php.ini php.ini_config IIS 7.5 php.ini 404 IIS7 FastCGI moodle error iis 7 eventlog PEAR PHPmyAdmin 500 - Internal server error. http FastGCI http-error 500 IIS 7.5 php fastcgi php fastcgi timezone php.ini windows 7 iusr php-cgi.exe iis7 fastcgi php performance PHP IIS7 64bit plesk PHP Manager ntdll.dll 500.0 thread cpu 100% error 503 on IIS 7 with PHP PHP 5.3.5 slow php5.3.5 multiple sites running slow performance slow iis 7 with fast cgi running slow php log errors IIS 7 fastCGI error PHP 500 errors Information

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

    Apr 06, 2011 08:49 PM|zigster|LINK

     I am getting the same message with IIS7 on a Windows Server 2008 machine.  But only at the very end of my processing, and only if I include any functional e-mail sending functions.  If I skip the e-mail section, everything works fine, but the moment I include the .inc - poof!  500 error.  It doesn't seem to matter which .inc I use (I've tried phpGuru's rmail most recently, also cdosys, aspemail, htmlmimemail, and others).

     I'm tearing my hair.  I've rewritten the code five ways from Sunday, but it doesn't seem to be a php error (the code is good and works on other (older) servers), but is some sort of problem using php-cgi.exe with FastCGI.

     Any ideas would be greatly appreciated.

    ~Z

  • Re: C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

    Apr 07, 2011 10:00 AM|javaswinger|LINK

    I am getting the very same error also. I have been trying for 3 days to get this to work. I have tried at least 3 different ways to create the Handler Mappings and nothing gets me past the 500 error. The odd thing is if I open a WindowsPowerShell window and use the PHP CGI executable directly then I see HTML output: d:\php\php-cgi.exe C:\inetpub\wwwroot\phpinfo.php I am using Windows Server 2008 R2 Standard Version 6.12 (Build 7600) Internet Information Services (Version: 7.5.7600.16385) PS D:\php> php -version PHP 5.3.6 (cli) (built: Mar 17 2011 10:48:37) Copyright (c) 1997-2011 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies I followed these directions: http://us3.php.net/manual/en/install.windows.iis7.php and I also read the install.txt file that came with the PHP code but still cannot get PHP to work in IIS7. I think it must be a permissions error so that is my task today to see if I can find out how to set permissions for the IIS7 users.
  • Re:IIS7-FastCGI-"PHP"-"Problems-Issues"-"Guides"-"For-"C:\PHP\php-cgi.exe" -"The FastCGI process...

    Apr 07, 2011 10:35 AM|HCamper|LINK

    Hello,

    Well it appears you have a working php.ini and that often is the hard part.

    I suggest that you first use the IIS Net Learning guides http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-7/ .

    And for users / accounts use this guide http://learn.iis.net/page.aspx/140/understanding-built-in-user-and-group-accounts-in-iis-7/ .

    Common cause php-cgi.exe failures Application Pool not being correctly followed by recycle settings

    http://learn.iis.net/page.aspx/697/configure-php-process-recycling-behavior/ .

    Martin :)

     

    PHP FastCGI IIS7 php fastcgi 500 IIS7 fastCGI Installation IIS7 FastCGI Installation Download Broken Link FastCGI process exited unexpectedly PHP IIS7 2008 PHP FastCGI extensions php fastcgi error iis7 fastcgi fastCGI error fastcgi module error 500 IIS 7.0 php fastcg IIS7 wordpress IIS7 fastcgi Installation vista SP1 PHP php fascgi fascgi IUSR IIS_USR permission php FASTCGI php iis7 fastcgi 500-error php fastcgi php.ini php.ini_config IIS 7.5 php.ini error iis 7 w2k8 FastCG 500 - Internal server error. FastGCI IIS 7.5 php fastcgi php fastcgi timezone php.ini windows 7 iusr php-cgi.exe iis7.5 windows 2008 PHP IIS7 64bit PHP Manager 500.0 X64 cpu error 503 on IIS 7 with PHP php5.3.5 phP slow performance slow iis 7 with fast cgi running slow php log errors windows server 2008 Information

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

    Apr 07, 2011 11:23 AM|javaswinger|LINK

    I finally fixed the problem by reading this article: http://forums.iis.net/t/1176350.aspx and changing the permissions using the post from "03-11-2011, 10:18 AM". I was missing the local IIS_IUSRS permissions for my d:\php folder and my d:\data\php folders. Once I fixed that, now I finally see phpinfo.php working!
  • Re: C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

    Oct 13, 2012 05:20 AM|smrahmani|LINK

    I had the same problem. It has been solved by remarking the three extensions in php.ini: php_fileinfo.dll php_shmop.dll php_xsl.dll

    PHP fastCGI error extension

  • Re: Re:IIS7-FastCGI-"PHP"-"Problems-Issues"-"Guides"-"For-"C:\PHP\php-cgi.exe" -"The FastCGI proc...

    Sep 12, 2013 11:59 AM|fifernand|LINK

    Yeah, Thanks HCamper, i did that and my Win7+IIS+PHP 5.3.8 is working.

    My problem was in 

    • Set extension_dir to point to the location where the PHP extensions are located. Typically, for PHP 5.2.X the value would be set as extension_dir = "./ext"
    <div>Because in Windows: extension_dir = "ext"</div>