View Complete Thread
  • Re: How to know for sure if FastCGI is being used to run php scripts

    Mar 04, 2009 07:25 PM|jtalbot|LINK

    That's an awesome answer! Just the kind of details I was lookin for. However, such a good answer is bound to lead to more questions :)

    I eagerly went ahead to try the test you suggested... but unfortunately the results I got don't quite seem to match up what you described.

    First the URI /phpinfo.php/foobar/?foo=bar returned a 404. I used /phpinfo.php/foobar?foo=bar (without the / after foobar, before the ?) and that seemed to work fine.

    If I set up the web.config file to use CGI, then phpInfo() returns ServerAPI = CGI/FastCGI (so it's ambiguous as to whether it's using CGI or FastCGI, but it's not using ISAPI). In that case, _SERVER["REQUEST_URI"] is absent (which I assume is equivalent to not being set) -- so this matches what you describe.

    However, if I set up the web.config file to use ISAPI, then phpInfo() returns ServerAPI = ISAPI (so I assume that means I properly set it up to use ISAPI). Yet, _SERVER["REQUEST_URI"] returns the full request (/phpinfo.php/foobar?foo=bar) (actually I'm in a subdirectory, so the result is /joomla156_mx/test.php/foobar?foo=bar -- I assume the subdirectory doesn't make a difference).

    I don't know if that means the host has done 'something' to fix ISAPI, or if I screwed up the test, or if you got it wrong in your post.

    So do the above results mean that using ISAPI would be better than using CGI, meaning less likely to have incompatibility for php?

    Is there a list of other incompatibilites that can occur when using ISAPI or CGI documented somewhere, or is _SERVER["REQUEST_URI"] the only issue?  

    Are you familiar with joomla, and more specifically the SEO settings in joomla?