Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there a way to know what Apache version, PHP version, and PHP libraries, etc. are available to a website without being given access to the server. I'm looking for something like phpinfo, but as said without access.

If not possible, what is the next best thing? I heard that headers can be used, but not sure how.

Thanks

share|improve this question
    
You should edit this to mean without ftp/console access to upload/write a phpinfo script. You must have access to view the headers –  Wayne Oct 28 '09 at 11:28
    
@Wayne, You're exactly right. I don't have access to "upload/write a phpinfo script". So is there any hope? –  ram Oct 28 '09 at 11:36

3 Answers 3

up vote 2 down vote accepted

This is basically hacking since you don't have access, so the only way I can think of technically to do would be with code injection.

Another, maybe less clever method, would be to email the administrator (or hosting company) of the server, and ask :-).

share|improve this answer
    
+1 asking the admin: seconded :) –  Pekka 웃 Oct 28 '09 at 12:11
    
Ok looks like I'm going to have to request access to the server before I work on the code. But I'm curious about the code injection you mentioned. Just out of curiosity, what are you talking about exactly? Would that tell me what PHP libraries/extensions are available for use? –  ram Oct 28 '09 at 12:35
    
The idea is to get code that is already there with a security hole in it to execute something like phpinfo(). But not really something I know a lot about. en.wikipedia.org/wiki/Code_injection#PHP_injection –  Kyle Brandt Oct 28 '09 at 13:05
    
This seems too risky for the simple purpose I need it for, will stick with requesting access. –  ram Oct 28 '09 at 17:45

You will get some information from the Server HTTP header. For example, our web server shows

Server: Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 mod_jk/1.2.26 PHP/5.2.6-1+lenny3
with Suhosin-Patch mod_python/3.3.1 Python/2.5.2 mod_ssl/2.2.9 OpenSSL/0.9.8g
mod_perl/2.0.4 Perl/v5.10.0

which you can check with using a website like SEOConsultants' Check Server Headers Tool or a program like netcat:

yourhost:~% nc someserver.com.au 80
GET /asdf HTTP/1.0
Host: someserver.com.au

HTTP/1.1 404 Not Found
Date: Wed, 28 Oct 2009 11:49:27 GMT
Server: Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 ...
Last-Modified: Tue, 27 Oct 2009 12:49:03 GMT
Content-Type: text/html
Connection: close

<html>
...

Note that this information may be obscured or replaced by server administrators.

share|improve this answer

That depends on what you mean by "without access". If you mean that you can only browse the website like ordinary users, then no, there isn't.

Some of that information may be exposed in headers, e.g. Apache can put its version into the HTTP headers it sends back, but even that is often disabled.

Note that many consider it a security risk to expose version and configuration information (because it makes it easier to target vulnerabilities in specific versions/configurations), so this information may even be disabled on purpose.

share|improve this answer

Your Answer

 
discard

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