How to Add a PHP Info File to View PHP Settings

This article describes how to add a PHP Info page to easily view PHP settings on you dedicated , cloud, VPS or Shared Hosting server.

You can use a file manager in your cpanel or a text editor to add the following code. In this example, we are adding the file on the server with the nano editor.

$ sudo nano /var/www/html/info.php

Add the following to the file. Save and close.

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);

?>

Now you can view the file at http://ipaddress

PHP Info Page from Geekdecoder

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.