HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Programming/Scripts (http://www.howtoforge.com/forums/forumdisplay.php?f=7)
-   -   How would you find the version of php running on a server you do not own? (http://www.howtoforge.com/forums/showthread.php?t=57354)

Annabeli 21st May 2012 09:33

How would you find the version of php running on a server you do not own?
 
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.

till 21st May 2012 09:40

Create a php file with the following content:

Code:

<?php
phpinfo();
?>

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

rosehosting 6th June 2012 05:47

Try with the following command;
# curl -I http://domain.com

Output:
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

Shader 6th June 2012 09:14

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


All times are GMT +2. The time now is 22:59.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.