How to Create a PHP Info Page¶
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¶
-
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
-
Log in to your hosting account using your username and password.
-
After logging in, find and access the "File Manager" option in your hosting control panel.
Step 2: Create the PHP Info File¶
-
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.
-
Click on the "Create New File" button within the file manager.
-
Enter a file name for the PHP info page. For example, you can name it
phpinfo.php
-
Click the "Create" or "Save" button to create the php file.
Step 3: Edit the PHP Info File¶
-
After creating the
phpinfo.php
file, right click the file > "Edit" the file. -
Add the following PHP code to the
phpinfo.php
file and then save it:
Step 4: Access the PHP Info Page¶
-
Open your web browser.
-
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 -
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)¶
-
For security reasons, it's a good practice to remove the PHP info page once you have gathered the necessary information.
-
Go back to the File Manager, find the
phpinfo.php
file and delete it.