If you can’t find the PHP version by logging into your web hosting control panel, or if you just want to find it out the geeky way, by asking the server itself, here’s how.
1. Make a new php file. Let’s call it serverinfo.php
2. Enter this as the contents of the file:
<? phpinfo(); ?>
phpinfo() is a special function in php that spits out pages and pages of info about your php installation.
3. Put the file on your web server. If you don’t know how to FTP a file to your server, you’re in real trouble, and you don’t really fit in on this website do you?
4. Go to that page in your browser. For me it was http://www.chrissilich.com/serverinfo.php. You should see something like this:
5. Right there at the top is the php version number. While you’re here though, peruse the file, get a little more acquainted with it. This function is a very valuable tool for finding out how your server is configured, and it’s very likely you’ll need it again, so having a general idea of what’s in it might be useful.
6. Delete the file. I say delete it because although there’s not nothing in there that they couldn’t find out some other way, hackers can use this info to skip a few research steps if they really want to take your site down.
