Where do i find php version?

NOTE: By default, we have PHP 7.2 set on our Shared servers.

To check what PHP version is selected for Stellar or Stellar Plus hosting accounts, go to cPanel > Software section > Select PHP Version menu:

Where do i find php version?

You will see the current PHP version above PHP extensions:

Where do i find php version?

If you have Stellar Business go to the Exclusive for Namecheap Customers section >> the PHP Tweaks menu:

Where do i find php version?

There you will see the domain and the PHP version set up for it:

Where do i find php version?

Another way to check PHP version is PHPinfo() function, commonly used to check the current state of PHP configuration. It can also be used for debugging purposes as it contains all EGPCS (Environment, GET, POST, Cookie, Server) data.

To run the function, follow the steps below:

1. Log into your cPanel account, go to the Files section > File Manager:

For cPanel Basic Theme:


Where do i find php version?

For cPanel Retro Theme:


Where do i find php version?

2. Navigate to the public_html directory, click on +File and create a phpinfo.php file:

Where do i find php version?

Where do i find php version?

3. Find the newly created file in the list and click on Edit in the upper corner menu or right-click on the file > Edit:

Where do i find php version?

4. Add the lines of the code provided below to the file and click on Save Changes:

<?php
phpinfo();
?>

Where do i find php version?

5. To see the detailed information about the PHP configuration of your account, open http://yourdomain.tld/phpinfo.php link in your browser, replacing yourdomain.tld with your main domain name.

NOTE: For the security reasons, do not forget to delete the file once you check all the necessary information.

 That's it!

                    Need any help? Contact us via Helpdesk

There are several possibilities to check and validate PHP version on Linux.

1. Open a bash shell terminal and use the command “php –version” or “php -v” to get the version of PHP installed on the system.

# php --version
PHP 5.4.16 (cli) (built: Mar  7 2018 13:34:47) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

# php -v
PHP 5.4.16 (cli) (built: Mar  7 2018 13:34:47) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

As you can see from both the command output above, the system has PHP 5.4.16 installed.

2. You can also check for the package versions installed on the system to get the PHP version.
On RedHat Based Distributions :

# rpm -qa | grep php
php-common-5.4.16-43.el7_4.1.x86_64
php-pdo-5.4.16-43.el7_4.1.x86_64
php-mysql-5.4.16-43.el7_4.1.x86_64
php-mbstring-5.4.16-43.el7_4.1.x86_64
php-cli-5.4.16-43.el7_4.1.x86_64
php-gd-5.4.16-43.el7_4.1.x86_64
php-5.4.16-43.el7_4.1.x86_64

On debian based distributions :

# apt list --installed | grep php

3. Let’s create a PHP file with content as shown below. The phpinfo() function outputs a great deal of information about the state of the current PHP environment, including loaded extensions, compilation options, version, server information, and so on.

# echo "<?php phpinfo();?>" > /var/www/html/phpinfo.php

4. Now, considering that Apache is installed and working, open a browser and test PHP using address as follow:

http://server/phpinfo.php

Where do i find php version?

How do I know PHP is installed?

Make sure the Web server is running, open a browser and type http://SERVER-IP/phptest.php. You should then see a screen showing detailed information about the PHP version you are using and installed modules.

How do I find PHP version in control panel?

From CPanel.
Login into your CPanel account..
Under General Information on the right panel, click Server Information..
Under the Item column, find PHP Version to know the PHP version for the domain..

How do I find PHP version on Mac?

Within the Terminal, run vim ~/. bash_profile Type i and then paste the following at the top of the file: export PATH=/user/local/bin:$PATH Hit ESC, Type :wq, and hit Enter In Terminal, run source ~/. bash_profile In Terminal, type in which php again and look for the updated string.

How do I know if PHP is installed on Windows?

“how to check if u have php installed in windows” Code Answer.
Open command prompt..
Locate directory using cd C:/Xampp/php..
Type command php -v..
You will get your php version details..