0

I want to do small "server software check" to make sure that my PHP application is running on Apache.

I want to warn my users about security problems when they run my web application on Microsoft IIS servers.

I have some SSL-connection checks and they do not work under IIS, and I'm too lazy to write separate functions for IIS support.


I need a function that checks software, not "manual check" as @Eda190 suggested.

2
  • 1
    I don't think this is a duplicate of the question above. The linked question above can be interpreted "How do I find out what server I'm running" (check the accepted answer for a clue to this). By my understanding, the asker is trying show a warning message programatically when the server the software is installed on doesn't match some criteria. Commented Mar 30, 2015 at 21:38
  • You are right @button, thanks for your edit. Commented Mar 31, 2015 at 15:45

2 Answers 2

4

See: http://php.net/manual/en/reserved.variables.server.php

You are after:

$_SERVER['SERVER_SOFTWARE'];
Sign up to request clarification or add additional context in comments.

Comments

1

You can use apache_get_version to get an apache version. If its not set its not apache.

http://php.net/manual/en/function.apache-get-version.php

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.