php Version Check

How to Check if php is installed on the Web Server
and how to Detect the php Version using phpinfo()

php is installed on most hosted Linux based web servers, but it's also available for Windows based web servers.

 

 

Check if php is installed on your Web Server

 

1. Create a text file, e.g. using notepad or any other text editor:

<?php

phpinfo();

?>

 

2. Save the file as "version.php". Make sure, that the extension is .php (not .txt)

3. Upload the file to the root of your web

4. Open the file in your web browser, e.g. http://www.yourdomain.tld/version.php

5. Delete the file on your web server after you are done. You should be the only one seeing this information!

 

 

How to detect the php Version?

 

Run the phpinfo() script above. 
It contains much more information, like:

Multiple php Versions on the same Server

 

Some web server are pre-configured to run e.g. php5 and php8 at the same time, to ensure compatibility with older scripts and CMS systems.
If you web server is configured for multiple php versions, select the php version by using e.g.

somescript.php5  // for php5 (old) scripts
somescript.php8 // for php8 scripts
somescript.php // for the default php version

The default php version depends either on your php configuration or on your hosting package.

Disclaimer: The information on this page is provided "as is" without warranty of any kind. Further, Arclab Software OHG does not warrant, guarantee, or make any representations regarding the use, or the results of use, in terms of correctness, accuracy, reliability, currentness, or otherwise. See: License Agreement