IIS FastCGI Request Parameters from PHP

I am trying to programmatically request FastCGI settings configured in IIS through the PHP COM API using WMI.

Using WMI CIM Studio I see that there is a FastCgiSection class that has a FastCgi membership array that contains exactly the settings I want (in particular, ActivityTimeout and RequestTimeout): http://msdn.microsoft.com/en-us / library / bb422421 (v = vs .90) .aspx

However, any attempt to poll this has so far failed. Examples of queries to Win32_Processor, etc., which you can find on the Internet, work fine, but translating this question into a FastCgiSection request does not work.

So far I have this that doesn’t output anything:

$wmi = new \COM('winmgmts:{impersonationLevel=Impersonate}//./root/WebAdministration');
$arrData = $wmi->ExecQuery("SELECT * FROM FastCgiSection");
foreach ($arrData as $obj) {
   echo "has result";
}

How do I access this API through WMI in PHP?

+4
2

FastCgiSection, FastCGI FastCgiApplicationElement.

FastCgi, , WMI. , , FastCgi:

$wmi=new COM('winmgmts:{impersonationLevel=Impersonate}//./root/WebAdministration');
foreach($wmi->ExecQuery('SELECT * FROM FastCgiSection') as $section) {
  foreach($section->FastCgi as $application) {
    echo $application->ActivityTimeout, PHP_EOL;
    echo $application->RequestTimeout, PHP_EOL;
  }
}

, , , :

+2

, , , , , : http://www.sitepoint.com/php-wmi-dig-deep-windows-php/

, ( ), , php.ini : extension=php_com_dotnet.dll

+3

Source: https://habr.com/ru/post/1537075/


All Articles