---
title: "phpinfo"
description: "phpinfo() is a PHP function that prints the full environment configuration. Learn what it reveals, how to use it and why to delete it from production."
url: "https://nodea.io/en/glossary/phpinfo"
lang: "en"
updated: "2026-07-13"
---

# phpinfo

> phpinfo() is a built-in PHP function that renders a page with a complete report on the interpreter's configuration — PHP version, loaded extensions, directives and environment variables. It is an administrator's go-to diagnostic tool.

**phpinfo()** is a built-in function in [PHP](https://nodea.io/en/glossary/php) that, when called, renders a large HTML page with a complete report on the interpreter's current configuration. It is the fastest way to see exactly how PHP is set up on a given server.

## How phpinfo() works

You simply create a file, for example *info.php*, containing *\<?php phpinfo();* and open it in a browser. PHP then prints organized tables covering, among other things: the PHP version number, the active runtime (such as [PHP-FPM](https://nodea.io/en/glossary/php-fpm) or CGI), the list of loaded extensions, and the values of directives from *php.ini* — like [memory\_limit](https://nodea.io/en/glossary/memory-limit), *upload\_max\_filesize* and *max\_execution\_time* — along with environment variables and server headers.

The function accepts an optional parameter to limit the report to a chosen section, for example only core configuration or only loaded modules. Its programmatic counterpart is *phpversion()*, useful when you need the version string alone.

## Practical application

phpinfo() is a daily tool for administrators and developers: it confirms whether [OPcache](https://nodea.io/en/glossary/opcache) is enabled, whether a required extension is present (for a database driver or image processing, say), and that a change in *php.ini* was actually loaded after a service restart.

One security rule is non-negotiable: a phpinfo() report reveals environment details that are gold to an attacker, so a file containing it should never stay publicly reachable in production. Delete it or lock down access the moment your diagnostics are done. On managed Nodea servers the PHP configuration is surfaced securely inside the control panel, with no need to expose such a page to the internet at all.

### Can I leave a phpinfo() file on the server?

No. A phpinfo() page exposes your PHP version, extension list, system paths and server configuration — all valuable to an attacker. Use the file once for diagnostics, then delete it or restrict access immediately after you finish checking.

## Related

- [PHP](https://nodea.io/en/glossary/php)
- [PHP-FPM](https://nodea.io/en/glossary/php-fpm)
- [OPcache](https://nodea.io/en/glossary/opcache)
- [memory\_limit](https://nodea.io/en/glossary/memory-limit)
- [phpMyAdmin](https://nodea.io/en/glossary/phpmyadmin)

---

Languages: [pl](https://nodea.pl/pl/slownik-pojec/phpinfo.md)  
Site index: [llms.txt](https://nodea.io/en/llms.txt)
