When the PHP vulnerability news broke, many people did the obvious thing: create an info.php file containing phpinfo() to see their PHP version. Then they left it there. That one file can hand an attacker a detailed map of your server.
What a public phpinfo() page can reveal
- The exact PHP version and build details
- Loaded modules and the full PHP configuration
- File system paths on your server
- Server software details
- Environment variables, which on some setups include secrets
An attacker uses this to pick the right exploit and to plan the next step. During an active vulnerability like PHP2Shell, an exact version and build date is precisely what they are looking for.

How to find leftover phpinfo files
grep -rl "phpinfo(" /var/www --include="*.php"
Also check for files with obvious names such as info.php, phpinfo.php and test.php. You can check from the outside too: search your own domain in a search engine for site:yourdomain.com inurl:phpinfo.

What to do instead
- On managed hosting, use the PHP Info page built into your control panel. It is protected by your login.
- If you must create a file, use a random name, read what you need, and delete it immediately.
- Better still, build an admin-only server status page into your own application, protected by a login.
phpinfo is rarely the only leftover
A site that has a forgotten phpinfo page often has other exposed files: old backups, .env files, .git folders, test scripts. Bots scan for these constantly. If your server logs show requests for .git/config or .env that were answered with a 200, assume the contents are public and rotate the secrets.
What ArtinTech Solution does
- Sweeps your site and server for exposed information files, leftover test scripts and forgotten backups
- Sets up safe, login-protected ways to see your PHP version and status
- Reviews your web server rules so sensitive files are not served
- Checks the logs for signs those files were already found and used
Not sure what your server is exposing? Hire ArtinTech Solution experts today for professional security audits, PHP upgrades, and emergency fixes.