Submit a Ticket
Support Center » Knowledgebase » Programming Languages » phpinfo()


The phpinfo() is commonly used to check the configuration settings of the system. It is also used as a debugging tool.

The phpinfo() provides detailed information about te PHP compilation options and extensions, server infomation and environment, OS version information, PHP version, the PHP environment, paths, master and local values of configuration options, HTTP headers, and the PHP License.


// Show all information, defaults to INFO_ALL
// Show just the module information.
// phpinfo(8) yields identical results.

The output may be customized by passing one or more of the following constants bitwise values summed together in the optional what parameter. One can also combine the respective constants or bitwise values together with the or operator.

phpinfo() options:
Name (constant) - Value - Description
INFO_GENERAL - 1 - The configuration line, php.ini location, build date, Web Server, System and more.
INFO_CREDITS - 2 - PHP Credits.
INFO_CONFIGURATION - 4 - Current Local and Master values for PHP directives.
INFO_MODULES - 8 - Loaded modules and their respective settings.
INFO_ENVIRONMENT - 16 - Environment Variable information.
INFO_VARIABLES - 32 - Shows all predefined variables from EGPCS (Environment, GET, POST, Cookie, Server).
INFO_LICENSE - 64 - PHP License information.
INFO_ALL - -1 - Shows all of the above.

Your phpinfo.php file needs to be a plain text file. This means you need to make it in a text editing program capable of producing plain text files.

After you have created your phpinfo.php file - uload the file to the server. You should upload your file to the exact directory you want to test and visit the page in your browser.

Now you can view all of the information about your server's PHP configuration for the particular directory where your phpinfo.php file has been uploaded.

 This answer was helpful  This answer was not helpful