Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can't imagine this is possible but maybe there's some novel way. I'm developing an app which will require a few php files to be deployed and run on the clients' webservers. I'm not particularly interested in targeting clients who are still running pre version 5 versions of PHP.

So is there any way one can tell which version of PHP a remote webserver has running?

share|improve this question
up vote 5 down vote accepted

You can use a site to view http headers such as

Some sites will return the PHP version in the server section of the header for example here's a response from a site I just tested:

Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5 
mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/ PHP/5.2.12

This is more likely to work on sites hosted on a standard shared hosting platform such as cPanel.

share|improve this answer
Also did the job. Didn't expect so many responses but I'll give you the tick as I re-install my development environment quite often and a website means one less tool to download. – jontyc May 10 '11 at 11:09

Many servers provide an X-Powered-By header which might include the PHP version. Try querying the server with curl:

curl -I
share|improve this answer
Worked great on the few sites I tried. Thanks. I'll vote your answer up when I reach enough points to do so. – jontyc May 10 '11 at 11:10
Also curl the www version of the website if you receive a "301 Moved Permanently" error – Neil Robertson Aug 9 '15 at 1:13

You can olso view X-Powered-By header using some browser add-ons, for example "Live HTTP Headers" add-on to Mozilla Firefox. However most production servers doesn't include X-Powered-By header.

share|improve this answer
I'll keep it in mind. I'll vote your answer up when I reach enough points to do so. Thanks. – jontyc May 10 '11 at 11:08

In fiddler, go to the compose tab and type in the web address and send a GET request. Then when the response pops up in the left window, double click on it. On the right side it'll showt he request and response details. In the response details (bottom right), click the RAW or HEADERS tab and take a look at the headers. The server info will be next to the Server: header

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.