Webmaster Forum UK
Forum Index -- Programming and Coding -- Php
       ...... How to check which PHP version your server is running?
Login
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
RealM



Joined: 28 Mar 2007
Posts: 1

PostPosted: Wed Mar 28, 2007 3:17 pm    Post subject: How to check which PHP version your server is running? Reply with quote

I just found this and thought it was cool:

Code:
<?php

phpinfo ();

?>
Back to top
View user's profile Send private message
Ash



Joined: 28 Mar 2007
Posts: 23

PostPosted: Wed Mar 28, 2007 3:57 pm    Post subject: Reply with quote

For those of that have no idea what the original poster has posted this is a simple way to find out what php version you have and more, much more.

Simply create a php file called what ever you want like test.php add the above code to the page and upload it to your server, now go to yourdomain.com/test.php and you will be shown a wealth of info, like realm said "enjoy"
Back to top
View user's profile Send private message
taikaish



Joined: 28 Mar 2007
Posts: 3

PostPosted: Wed Mar 28, 2007 4:57 pm    Post subject: Reply with quote

If you want to show it in your site,
Save the 'html' to .php,
and add this code to the place you want to show it.
Done!
Back to top
View user's profile Send private message
shogunmike



Joined: 29 Mar 2007
Posts: 3

PostPosted: Thu Mar 29, 2007 9:00 am    Post subject: Very handy for showing installed pesky libraries! Reply with quote

It's great for showing whether things like GD Image Library are installed, and even whether PHP is talking to any MySQL database or what not. In fact, it's probably the most useful PHP function ever... Very Happy

Obviously it's also a great way of working out whether PHP is working at all...
Back to top
View user's profile Send private message
chrishirst



Joined: 29 Mar 2007
Posts: 40
Location: Blackpool

PostPosted: Thu Mar 29, 2007 11:53 am    Post subject: Reply with quote

taikaish wrote:
If you want to show it in your site,
Save the 'html' to .php,
and add this code to the place you want to show it.
Done!


This is absolutely something NOT to do

Unless of course you really WANT to advertise any potential weak points for every scummy site hacker around.
_________________
Chris.

So long, and thanks for all the fish.
Back to top
View user's profile Send private message Visit poster's website
Gorlim



Joined: 29 Mar 2007
Posts: 4

PostPosted: Thu Mar 29, 2007 2:38 pm    Post subject: Reply with quote

Even more. Don't keep this file on your server with easily-guessed names like inf.php, phpinf.php, info.php, etc.
_________________
Network Monitoring | Website Monitoring | Free Website Monitoring
Back to top
View user's profile Send private message
Walter Godfrey



Joined: 28 Mar 2008
Posts: 10

PostPosted: Fri Jun 20, 2008 8:14 am    Post subject: Reply with quote

It is possible to run different PHP versions for different folders. More information on how to do this can be found in this article.
In order to check exactly which PHP version is used for a certain folder, you should create a simple php file.
_________________
Drupal Web Hosting
Back to top
View user's profile Send private message
technophobicseo



Joined: 24 Oct 2008
Posts: 6

PostPosted: Fri Oct 24, 2008 9:20 am    Post subject: Reply with quote

Chris is right.. your site will be an open book for everybody.

its a no no.
_________________
Designer Clothes Online offers Polo Ralph Lauren Clothing Lines
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum