> For the complete documentation index, see [llms.txt](https://lanzt.gitbook.io/cheatsheet-pentest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lanzt.gitbook.io/cheatsheet-pentest/port-enumeration/80-443-web/identify-php.ini-file-used.md).

# Identify php.ini file used

To identify the php.ini file that has been used, we could write a file with a phpinfo() function and extract the info.

## Create file with phpinfo(); inside

```bash
echo '<?php phpinfo(); ?>' > info.php
```

## Check the file in web browser

<figure><img src="/files/Fn0H2gAXmCvN4lLUEJmR" alt=""><figcaption></figcaption></figure>

And we have the exact php.ini file used for the web server.
