What is a phpinfo file and how to create it

What is a phpinfo file and how to create it

A phpinfo.php file is a file that makes it easier for you to see PHP information about the server you are hosted on.

If you’re not familiar with how to create a php page, follow the steps below to create a phpinfo page using your File Manager.

  1. Log into your cPanel.
  2. Open your File Manager.
  3. Navigate to the directory you are working with. This is important because each folder can actually be set to have different php settings. In this example, we are viewing the php settings for our main domain, so we are navigating to the public_html folder.
  4. In the top menu, click New File.
  5. When prompted for the file name, enter phpinfo.php (it can actually be named anything, phpinfo.php is simply a common name for the file).
  6. Find the phpinfo.php file in your list of files (it should have automatically updated). Right click on it and choose “Edit”. If you see a “Text Editor” prompt, choose “utf-8” from the drop down list and then click “Edit”.
  7. Enter the following text:
    <? phpinfo(); ?>

    Then click Save Changes.

While it doesn’t include version information about your database scheme, it does include version information about PHP, Apache/IIS, GD, and other things. It also contains a description of many important settings, which could possibly be causing problems with your php script installation.

What information can I get from phpinfo

A phpinfo file provides comprehensive information about the PHP configuration and settings on a server. Here are some of the key pieces of information you can gather from a phpinfo file:

PHP Version: The phpinfo file displays the version of PHP installed on the server. This information is important for compatibility with PHP scripts and applications.

Configuration Settings: It provides details about the PHP configuration settings, including directives related to error handling, file uploads, session management, and more.

  1. Loaded Extensions: You can see a list of all the PHP extensions that are currently loaded and enabled on the server. This is useful for verifying if specific extensions required by your application are available.
  2. Server Information: The phpinfo file displays information about the web server software running on the server, such as Apache or Nginx, along with its version.
  3. Environment Variables: It shows the environment variables available within the PHP environment. This includes information about the server, user, and other variables that can be useful for debugging and configuration purposes.
  4. PHP Modules: It lists the compiled-in modules and their respective configurations. These modules provide additional functionality to PHP, such as database connectivity or encryption.
  5. PHP Directives: The file provides a complete list of PHP directives and their current values. These directives control various aspects of PHP behavior, such as memory limits, error reporting, and execution time.
  6. Loaded Configuration File: You can find the path to the PHP configuration file (php.ini) being used by the server. This allows you to locate and modify the configuration settings if needed.

Overall, the phpinfo file provides an extensive overview of the PHP environment on the server, allowing you to troubleshoot issues, verify settings, and gather information for debugging purposes.


Previous Post
How to install WAMP
Next Post
How to use Screen for Linux

Get Online Today!


Your perfect domain name is waiting!

Search our huge portfolio for more domain name extensions and pricing below
domain name extensions

Classic Domain Names

.COM | .AU | .CO | .NET | .BIZ | .ME | .EU | .ASIA | .TV | .MOBI | .NAME | .INFO | .ORG | .US | .NL| .FM | .HK | .ES | .CO.NZ | .DE | .CO.UK | .RU | .IM | .PM | .TW | .FR | .CN | .CA | .CH | .VN | .PL | .IL | .JP | .KR |