Linux - How to check PHP configuration - phpinfo()
- Last updated: Nov 3, 2023
- Views: 353
- Author: Admin
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:
- phpinfo() function.
- 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.
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.
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
The second command shows all installed modules in PHP.
$. php -m
The last command which shows detailed information about PHP.
$. php -i
Thank you all, I hope my article was of some help to you.