How to Create a PHP Info Page Print

  • 334

A PHP info page provides detailed information about the PHP configuration and settings on your server. It's a useful tool for developers and system administrators to diagnose PHP-related issues and ensure that PHP is properly installed and configured. Here's how you can create a PHP info page using the file manager in a hosting account:

Step 1: Log in to your Hosting Account

  1. Open your web browser and go to your hosting accounts login URL. cPanel is typically found at example.com:2083 and DirectAdmin is typically found at example.com:2222

    One-Click Login for Asura Hosting Customers

    We also allow one-click login through the Client Area 

  2. Log in to your hosting account using your username and password.

  3. After logging in, find and access the "File Manager" option in your hosting control panel.

Step 2: Create the PHP Info File

  1. In the File Manager, navigate to the directory where you want to create the PHP info page. This is typically the "public_html" or "www" directory, which is the root directory of your website.

  2. Click on the "Create New File" button within the file manager.

  3. Enter a file name for the PHP info page. For example, you can name it phpinfo.php

  4. Click the "Create" or "Save" button to create the php file.

Step 3: Edit the PHP Info File

  1. After creating the phpinfo.php file, right click the file > "Edit" the file.

  2. Add the following PHP code to the phpinfo.php file and then save it:

<?php// Show all PHP information
phpinfo();
?>

Step 4: Access the PHP Info Page

  1. Open your web browser.

  2. Enter the URL of the PHP info page in the address bar. The URL should be something like example.com/phpinfo.php, where "example.com" is your actual domain name and "phpinfo.php" is the file name you created in Step 2

  3. The PHP info page will be displayed, showing detailed information about your PHP configuration, modules, environment, and more.

Step 5: Remove the PHP Info Page (Optional)

  1. For security reasons, it's a good practice to remove the PHP info page once you have gathered the necessary information.

  2. Go back to the File Manager, find the phpinfo.php file and delete it.

 

Was this answer helpful?

« Back