Please use the “Print” function at the bottom of the page to create a PDF.
Valid for Linux Web Hosting.
This article explains how you can display detailed information about your PHP environment using the phpinfo() function. You will learn how to create a simple PHP script, upload it to your web space, and open it in the browser. You will also receive important security instructions for using this function, and learn about an access-protected alternative provided by IONOS.
Please Note
The phpinfo() function should not be used permanently on publicly accessible production systems. The information output is very detailed and could reveal sensitive data about your server configuration that could be of interest to potential attackers. It is therefore essential that you remove the script from your webspace after analyzing it.
What information does phpinfo() provide?
You will receive information such as:
The installed PHP version
The configuration options and their current values
The available PHP modules
Compilation and operating system details
Alternative: Use the protected info.php script from IONOS
IONOS already provides a prepared script in your web space. This is password-protected, and is therefore the simpler and more secure method.
To execute the script, call it up in the browser according to the following scheme: https://your-domain.tld/logs/info.php
The login details of your SFTP/SSH main user are requested when you open the page.
Display PHP configuration with own phpinfo() script
If you still want to execute the phpinfo() function manually, follow these steps:
Open a simple text editor on your computer (e.g. Notepad on Windows, or TextEdit on macOS) and paste the following PHP code:
<?php
// Display the PHP configuration
phpinfo();
?>Save the file under a unique name, for example info.php.
Upload the created file via SFTP to your web space in the root directory of your domain.
Call up the script in your web browser. To do this, customize the example URL with your domain and the file name you have chosen: https://your-domain.tld/info.php
Once you have viewed the desired information, delete the file from your web space again immediately for security reasons.
Missing PHP modules in shared hosting
If you notice in the configuration overview that a PHP module you require is not listed, it cannot be installed retrospectively with a shared hosting package.
If you need full administrative freedom to customize the PHP environment and other server services according to your own needs, a product with root access such as an IONOS VPS or Dedicated Server is the right choice.