#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    6
    Rep Power
    0

    FastCGI Status Code responses?


    php .net site states:
    "For FastCGI you must use the following for a 404 response:"
    PHP Code:
    header("Status: 404 Not Found"); 
    Can anyone tell me if this is meant to apply ONLY to the 404 ...or do they mean that one must use that format for all FastCGI responses?!?


    PHP Code:
    header("Status: 410 Gone");
     
    header("Status: 301 Moved Permanently");
     
    etc..
     ???????????? 
  2. #2
  3. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,183
    Rep Power
    9398
    The code says "404 Not Found". Compare that with things like "301 Moved Permanently" and "200 OK" and "500 Internal Server Error".

    When do you think they should be used?

    As for having it in all responses, the default is a 200 so you only need one if you want something else.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    6
    Rep Power
    0

    I think you totally missed the question


    I think you totally missed the question. I did not ask how or when to use them, i asked about the proper syntax for issuing them via php - WHEN the script is processed through FastCGI.

    To reiterate the initial question.... php .net manual states:

    PHP Code:
    header("HTTP/1.0 404 Not Found"); 
    That instead of using the typical syntax, above, that for FastCGI you must use the following for a 404 response:
    PHP Code:
    header("Status: 404 Not Found"); 
    So, the question is: Can anyone tell me if this is meant to apply ONLY to the FastCGI 404 Response ...or did they offer the "Status: 404 Not Found" only as an example and one must use that same format when issuing other FastCGI status response headers as well?!?
  6. #4
  7. Wiser? Not exactly.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,953
    Rep Power
    4033
    It's just an example. The concept applies in general to any status code you may want to send.
    Recycle your old CD's, don't just trash them



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    6
    Rep Power
    0
    Originally Posted by kicken
    It's just an example. The concept applies in general to any status code you may want to send.
    Thanks! Exactly the simple confirmation I was looking for.

IMN logo majestic logo threadwatch logo seochat tools logo