Skip to content

Viewing PHP settings with the phpinfo() function

The phpinfo() function is a built‑in PHP command that outputs detailed information about the PHP environment. On ruachost.com, you can use this function to check PHP configuration settings, extensions, and server details.

  • Verify which PHP version your site is running.
  • Check enabled extensions (e.g., MySQL, GD, cURL).
  • Review configuration options such as memory limits, upload sizes, and timeouts.
  • Troubleshoot compatibility issues with applications or frameworks.
  1. Log in to your hosting account via FTP, SFTP, or File Manager.
  2. Navigate to your site’s root directory (public_html).
  3. Create a new file named info.php.

Insert the following code into the file:

<?php
phpinfo();
?>
  1. Save the file.

  2. Visit the file in your browser:

    http://yourdomain.com/info.php
  3. A page will display detailed PHP configuration information.

  • The phpinfo() output contains sensitive server details.
  • Do not leave the file accessible on a public site.
  • Delete or rename the file after testing.

When you run phpinfo(), you’ll see information such as:

  • PHP version (e.g., 8.2.12)
  • Loaded extensions (e.g., mysqli, gd, intl)
  • Server API (e.g., Apache 2.0 Handler)
  • Configuration directives (e.g., memory_limit, upload_max_filesize)