Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect current IIS version with PHP?

My approach now is …

if ( preg_match( '~IIS/(\d+\.\d+)~', $_SERVER['SERVER_SOFTWARE'], $matches ) )
    $version = $matches[1];

… but I have no experience with IIS, and after searching for a while I found no information how reliable that is. The server signature might be suppressed, or the pattern might be changed in older versions or by additional software.

Is it possible to detect the full correct IIS version with PHP? Maybe with the Windows only extensions? Are there any pitfalls I should be aware of?

like image 482
fuxia Avatar asked Feb 15 '13 18:02

fuxia


People also ask

How do I know my IIS version?

Using Run CommandSelect windows +R key and type inetmgr and press OK. It will open the IIS manager window . In the same way go to Help ->About Internet Information Services and you will get the version installed on your computer.

Can PHP run on Microsoft Windows IIS?

The fastest and easiest way to install PHP on Internet Information Services (IIS) is by using the Microsoft® Web Platform Installer (Web PI). Web PI completely automates setting up IIS, FastCGI, and the latest version of PHP from the php.net Web site.

What version of IIS is on 2019?

IIS 10.0 version 1809 a.k.a. version 10.0. 17763 is included in Windows Server 2019 and Windows 10 October Update released 2018-10-02.


1 Answers

as I know the structure of IIS Version Is Fix like this

 Microsoft-IIS/5.0 (Windows 2000)
 Microsoft-IIS/5.1 (Windows XP)
 Microsoft-IIS/6.0 (Windows 2003 Server)
like image 60
mohammad mohsenipur Avatar answered Oct 22 '22 22:10

mohammad mohsenipur