1. Home
  2. Hosting
  3. Control Panel cPanel
  4. PHP (general-purpose scripting language)
  5. How to View My PHP Settings (Version, Directives, Modules)?

How to View My PHP Settings (Version, Directives, Modules)?

For the PHP directives there are system values set by default. You can get information about them by calling the phpinfo() function.

By using phpinfo you can view the PHP version, enabled PHP modules/extensions, server information, OS version, paths, HTTP headers and others.

You need to create a file with a .php extension such as sdhrd.php in a directory, accessible through web. Then write the following lines in it:

<?php
phpinfo();
?>

Open the newly created file in your browser.

Settings and directives in the PHP configuration file (phpXX-fcgi.ini)
Settings and directives in the PHP configuration file (phpXX-fcgi.ini)

Depending on where you have located it in your hosting account, write down the full web address to the file.

For example, if it is located in the public_html/dir/ directory, you should access:

https://mysupersite.com/dir/sdhrd.php

replace mysupersite.com with your domain name, dir with the directory name and sdhrd.php with the new file name.
Note: After the phpinfo file is no longer needed, it is better to delete it from your hosting account.
Updated on 02.04.2022
Was this article helpful?

Related Articles