FastCGI Return Real Error CodeRSS

3 replies

Last post Sep 22, 2016 08:58 AM by Yuk Ding

  • FastCGI Return Real Error Code

    Sep 20, 2016 05:32 PM|DJX|LINK

    How do I configure IIS to return the real error code of a interpreter running via FastCGI?

    Currently, I have Perl and PHP configured via FastCGI.

    If I request a page that is not found (404), it will return a generic 500 internal server error.

    Only looking through my tracing logs, can I determine the real cause of the 500 error; In this case, the file is simply not found (does not warrant a 500 error).

    185. view trace 
    Warning 
    -MODULE_WARNING 
    
    
    ModuleName
    FastCgiModule 
    
    Data1
    FASTCGI_RESPONSE_ERROR 
    
    Data2
     
    
    ErrorCode
    4 
    
    ErrorCode
    The system cannot open the file. (0x4) 
     FastCgiModule 
    186. view trace 
    Warning 
    -MODULE_SET_RESPONSE_ERROR_STATUS 
    
    
    ModuleName
    FastCgiModule 
    
    Notification
    128 
    
    HttpStatus
    500 
    
    HttpReason
    Internal Server Error 
    
    HttpSubStatus
    0 
    
    ErrorCode
    0 
    
    ConfigExceptionInfo
     
    
    Notification
    EXECUTE_REQUEST_HANDLER 
    
    ErrorCode
    The operation completed successfully. (0x0) 
     
    
  • Re: FastCGI Return Real Error Code

    Sep 21, 2016 09:24 AM|Yuk Ding|LINK

    Hi DJX,

    It seems to be an error report permission problem.

    To resolve your problem, you could try the following steps:

    1.       Open php.ini

    2.       Find and set the display_errors = On directive

    3.       Save and close file

    4.       Type iisreset.exe in command prompt with administration property

    5.       Disabled friendly error message.

    6.       Within Internet Explorer Go to Tools, Internet Options, Advanced tab, and then clear the Show friendly HTTP error messages check box.

    Best Regards,

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.
  • Re: FastCGI Return Real Error Code

    Sep 21, 2016 03:30 PM|DJX|LINK

    No change.

    Besides, I'm not just talking about PHP, I also am referring to Perl.

  • Re: FastCGI Return Real Error Code

    Sep 22, 2016 08:58 AM|Yuk Ding|LINK

    Hi DJX,

    It seems that an 500 error occur before the page show an 404 error.

    Please check the configuration for perl and PHP first.

    Here is the link about how to run Perl on IIS 7:

    http://blogs.iis.net/wadeh/running-perl-on-iis-7

    This link show the steps to configure PHP/ fast-cgi in IIS7:

    https://technet.microsoft.com/en-us/library/dd239230(v=ws.10).aspx

    Best Regards,

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.