How would you find the version of php running on a server you do not own?

Discussion in 'Programming/Scripts' started by Annabeli, May 21, 2012.

  1. Annabeli

    Annabeli New Member

    I've searched google for this and you would need to insert php code to find out the version, I don't think you can do that own a server you don't own. I was told that if I connect to a website through telnet it would tell me the php version was running on the server.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Create a php file with the following content:

    upload it to your server and open it in the browser to get all php details incl. version number displayed.
  3. rosehosting

    rosehosting Member

    Try with the following command;
    # curl -I

    HTTP/1.1 200 OK
    Date: Wed, 06 Jun 2012 03:42:54 GMT
    Server: Apache/2.2.16 (Debian)
    X-Powered-By: PHP/5.3.13-1~dotdeb.0
    Content-Type: text/html
  4. Shader

    Shader New Member

    If you can't upload a php file to make phpinfo(), or if PHP information is hidden from headers by ServerTokens directive, there's still one way to get PHP version. Add ?=PHPE9568F36-D428-11d2-A769-00AA001ACF42 to any .php url. For example index.php?=PHPE9568F36-D428-11d2-A769-00AA001ACF42. It still could be hidden, but sometimes administrators forget to hide it :)

    If you see a guy with breadsticks - it's PHP 4.0.0 - 4.2.3
    If you see a brown dog - it's PHP 4.3.0 - 4.3.10
    If you see a black dog - it's PHP 4.3.11 - 4.4.6; or 5.0.4 - 5.1.2
    If you see a rabbot - it's PHP 5.0.0 - 5.0.3
    If you see a PHP logo - it's PHP 5.1.3 - 5.2.13
    If you see a PHP elephant - it's 5.3.0 or newer

Share This Page