.. _structures-phpinfousage: .. _phpinfo: Phpinfo +++++++ `phpinfo() `_ is a great function to learn about the current configuration of the server. If left in the production code, it may lead to a critical leak, as any attacker gaining access to this data will know a lot about the server configuration. It is advised to never leave that kind of instruction in a production code. `phpinfo() `_ may be necessary to access some specific configuration of the server : for example, ``Apache`` module list are only available via `phpinfo() `_, and apache_get(), when they are loaded. .. code-block:: php Connex PHP features ------------------- + `phpinfo `_ Suggestions ___________ * Remove all usage of phpinfo() * Add one or more constant to fine-tune the phpinfo(), and limit the amount of displayed information * Replace phpinfo() with a more adapted method : get_loaded_extensions() to access the list of loaded extensions Specs _____ +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Short name | Structures/PhpinfoUsage | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Changed Behavior `, :ref:`Security ` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 0.8.4 | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Severity | Major | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Examples | :ref:`case-dolphin-structures-phpinfousage` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+-------------------------------------------------------------------------------------------------------------------------+