How can I create a phpinfo.php page?

  Print

You can use a phpinfo() page to view the current PHP information for your server.

This file outputs a large amount of information, such as:

  • Information about PHP compilation options and extensions
  • PHP version
  • Server information and environment (if compiled as a module)
  • PHP environment
  • OS version information, paths, master and local values of configuration options
  • HTTP headers
  • PHP license

Because every system is set up differently, phpinfo() is commonly used to check PHP configuration settings and for availablepredefined variables on your particular system.

phpinfo() is also a valuable debugging tool, as it contains all EGPCS (Environment, GET, POST, Cookie, and Server) data.

Create a phpinfo.php page

  1. To create a phpinfo file, open a plain text file, add the following lines, and save it:

<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>

Upload the file to the server. You should upload your file to the exact directory you want to test. Typically, this will be your html (/home/USERNAME/public_html/)

Visit the page in your browser. If you uploaded it to your html directory, you should now visithttp://www.example.com/phpinfo.php, replacing example.com with your own domain name.

Now you can view all of the information about PHP for your server for that particular directory.


Did you find this article useful?   0 out of 0 people found this article useful.

  • Comments

Add Comment

Replying to  

  Refresh
Self-Hosted Help Desk Software by SupportPal.

Login

 
Forgot password?
Register now

Language