0 items
24/7 Support & Sales   1300 210 210
Online Support Web Hosting

How to create a phpinfo page

What is phpinfo.php?

A phpinfo.php file is a file that gives you information about your server configuration. It can also help you troubleshoot your server because it has information about other important settings in your server, many of which may help you figure out the causes of problems within your web server.

This file will not have information on the current version of your database scheme, but it does have the following useful data:

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

As a debugging tool, phpinfo.php also contains all EGPCS data, which means the following data specifically:

  • Environment
  • GET
  • POST
  • Cookie
  • Server

How to create a phpinfo.php page

To create a phpinfo.php page in your web server, follow the steps below:

  1. Click on My Account at the top of the page.
  2. Select Hosting Manager from the drop-down menu.
  3. Enter your username and password, and click Log In.
  4. On the Home page, click the word Files or the [ v ] arrow symbol on the right side.
  5. Click the File Manager icon, which is next to the Directory Privacy icon.
  6. On the pop-up screen, select Web Root (public_html/www) and click Go.
  7. Next screen, all of the files and folders in your web space will be displayed in a tree-style directory. Make sure you are in the public_folder.
  8. On the top-left of the page, click File.
  9. Type in the filename, which is phpinfo.php, and click Create New File.
  10. Find the newly created phpinfo.php file and right-click on it.
  11. In the dropdown menu, click Edit.
  12. On the pop-up box, make sure the character encoding setting is utf-8 or ascii. Click Edit.
  13. Add the following code in the opened file:
           < ?php phpinfo(); ?>
           
  14. Click Save Changes.

Note: When using the CLI (command line usage) mode, phpinfo() outputs are in plain text instead of HTML.

If you want to see the phpinfo.php file you just created, view it on your browser by typing the file's web address (url) in the browser address bar. If you placed it in the correct folder, the URL will be http://yourdomain.com/phpinfo.php.

Important Note: After you have the information you need, are done troubleshooting your server, or have accomplished any other purpose of the phpinfo.php file, it is recommended that you delete it from your server. You can also simply rename the file and/or move it to another directory.

These measures are all for security purposes. Malicious hackers could easily use this file to gather information about your server that might compromise your hosting account.

If you want to know how to change PHP versions, click here.

If you want to know how to use different PHP versions, click here.

If you want to know how to access the File Manager, click here.

Was this helpful? Yes No 69% of people found this helpful.