Previous Next

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

Last post 05-15-2008 12:27 PM by Alex.W474. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 05-15-2008, 11:13 AM

    • c_creaney
    • Not Ranked
    • Joined on 01-21-2008, 2:47 PM
    • Posts 3
    • c_creaney

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

    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

    "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.

     

  • 05-15-2008, 12:14 PM In reply to

    • c_creaney
    • Not Ranked
    • Joined on 01-21-2008, 2:47 PM
    • Posts 3
    • c_creaney

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

    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

     

  • 05-15-2008, 12:27 PM In reply to

    • Alex.W474
    • Top 100 Contributor
    • Joined on 05-14-2008, 9:16 PM
    • Posts 24
    • Alex.W474

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

    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.

Page 1 of 1 (3 items)
Page view counter