How to view PHP settings with the phpinfo() function

Last modified: Friday November 24th, 2023

From this article, you will know how to use the phpinfo() function to view detailed information about the PHP environment, settings, and more other.

! You must have a Beehosting account to view the output of phpinfo() on our servers. The information disclosed by the phpinfo() function is a potential security risk, so we do not make it publicly available. Hackers and other attackers can use the information from phpinfo() to plan an attack.

Viewing PHP settings with phpinfo Function

During web development, you need to check your PHP settings as often as possible. To do this, run a script that calls the phpinfo() function. When you load a page in a web browser, the script shows all the PHP configuration settings for your website.

How to use the phpinfo() function to view PHP settings:

  1. Create a file containing the following code:
    <?php
        phpinfo();
    ?>
  2. Save the file as info.php or something similar.
  3. Upload the file to your public_html directory.
  4. In a browser, navigate to http://example.com/info.php, where example.com is your website’s domain name. The page displays a lot of information about installing PHP.
    For security reasons, you should disable any calls to the phpinfo() function when website development and testing are complete.

More Information

For more information about the phpinfo() function, please visit http://www.php.net/manual/en/function.phpinfo.php.

Was this article helpful?
Views: 276

10 Years Beehosting!
Celebrate with 70% OFF + FREE Site Transfer.

Beehosting.pro website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Menu