Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Paul Murphy
6,162 PointsFinding out what version of PHP a site is running
Hello all,
New to all of this and getting slightly blinded by all of the technical jargon.
I have been informed by our web hosting company that an upgrade has to take place on our server and for that to happen I need to find out what version of PHP the current site is running. Could somebody please put me in the right direction of how to do this.
Many Thanks, Paul
7 Answers

Mike Costa
Courses Plus Student 26,362 PointsHey Paul,
I think what Gopinath meant was this single line of code:
<?php phpinfo(); ?>
That should give you every bit of info about the version of php running on the server.

justinw
14,517 PointsPaul,
I ran into this when I updated my website. Depending on who your hosting provider is you can handle this a couple of ways.
Call them and ask - you will need to supply your Account # or verify it's your account in someway but they will be able to tell you.
Login to your hosting account and take a look at your server settings. I use GoDaddy so it's pretty simple to accomplish this task.
Do you know who your hosting is? If so we can easily provide further details.

Paul Murphy
6,162 PointsHi Justin,
Firstly, thank you for your reply.
I was actually informed by our hosting company (UKFast) of the matter. The site in question is www.masteel.co.uk I am quite sure that in fact the site does not run any PHP script at all but would appreciate any further guidance.
Thanks

gopinath para
2,880 PointsHi Paul Murphy
?>
Just put that single line of code in a PHP file, and run it on your server. That's it! By running the file you should have all of the PHP information you need
cheers :)

gopinath para
2,880 PointsMy Bad ...I didn't see that it Was published :) Mike Costa

Mike Costa
Courses Plus Student 26,362 PointsNo worries gopinath para :)

Paul Murphy
6,162 PointsMany thanks everyone! Highly appreciate the responses!!