Linux - How to check PHP configuration - phpinfo()

  • Last update: Apr 3, 2024
  • Views: 26
  • Author: Admin
Linux - How to check PHP configuration - phpinfo()

Hello colleagues.

Every web application or site has important PHP version, extensions and configuration requirements installed on the server. It is recommended to make sure that all necessary PHP settings are installed on your server.

 

The content of the article:

  1. phpinfo() function.
  2. PHP console utility.

 

1. The phpinfo() function.

In the first version of checking the php configuration, the special php function phpinfo() will help us. To use this function, you need to create a file with any name with the .php extension in the root directory of the site, in which you place the code below and save the file.


phpinfo();

 

After saving the file, enter the domain and name of the created file in the browser, and as a result, if PHP is activated on your server, a page with its version and all existing parameters will be displayed.

php info


 

2. PHP console utility.

The next check option we can use is a special php utility that is installed on your server along with all php components.

The first command shows the PHP version on the server and the compilation time.

$. php -v

php info

 

The second command shows all installed modules in PHP.

$. php -m

php info

 

The last command which shows detailed information about PHP.

$. php -i

php info


 

Thank you all, I hope my article was of some help to you.

SIMILAR ARTICLES