Loading...

Knowledge Base

How To Create a phpinfo Page in Plesk

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 Page in Plesk

Follow the steps below to create a phpinfo.php page using Plesk:

  1. Access your Hosting Manager.
  2. Click Files from the left-side menu.
  3. Click httpdocs from the folders panel under Home directory.
  4. Click the New button at the top and select Create File.
  5. Enter the filename: phpinfo.php, and click OK.
    You will be routed back to your httpdocs folder.
  6. Click the newly created phpinfo.php file to edit it.
    You can also click on the menu icon to the right of the file name and select Edit in Code Editor. If you select Edit in Text Editor, make sure you set Save in the following encoding to UTF-8 or ASCII.
  7. Add the following code in the opened file:
     
    <?php phpinfo(); ?>
    
  8. Click OK to save.

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 in your browser by typing the file's web address (url) in the browser address bar. If you place it in the correct folder, the URL will be http://yourdomain.com/phpinfo.php.

IMPORTANT: After you have the information you need, are done troubleshooting your server, or have accomplished any other purpose for 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.

Please contact us, if you have any questions, or if you need any assistance in creating phpinfo page in Plesk, we'd love to help!

Did you find this article helpful?

 
* Your feedback is too short

Loading...