ThisCalculator

Everyday

Unknown PHP Requests in Logs: What They Mean

Updated · Standard formula, shown below

Requests per hour 4.17 req/h
Average seconds between requests
864.0 s
Result
Time window
24 hours
You entered
Number of requests
100 count
You entered

Unknown PHP Requests in Logs: What They Mean

Unknown PHP requests in your server logs are typically automated probes scanning for vulnerable scripts, misconfigured files, or outdated plugins—not legitimate visitors. This article explains what these requests are, why they appear, and how to tell harmless noise from a real threat, with practical steps to secure your server.

Formula

The calculator above estimates the rate of unknown PHP requests in your logs. Enter the time window (in hours) and the number of requests you observed. The rate is simply:

Rate = Number of requests ÷ Time window (hours)

The average interval between requests is (Time window × 3600) ÷ Number of requests, giving seconds. These metrics help you gauge whether the traffic is a slow crawl or a rapid burst—useful for deciding if you need immediate action.

Worked Example

Using the defaults: you see 100 unknown PHP requests over 24 hours.

  • Rate = 100 ÷ 24 = 4.17 requests per hour
  • Interval = (24 × 3600) ÷ 100 = 864 seconds (about 14.4 minutes)

That level suggests a low, steady scan—likely from a bot, not a human. A sudden spike to hundreds per hour would indicate an active attack.

What Are Unknown PHP Requests?

When you look at server access logs, you often see lines like GET /wp-content/uploads/2020/01/shell.php or POST /index.php?cmd=whoami. These are requests for PHP files that don’t exist on your server, or requests to existing PHP files with unexpected parameters. They come from automated tools that scan the internet for vulnerable websites. The tools try known paths for common vulnerabilities—like old WordPress plugins, phpMyAdmin, or file upload scripts—hoping to find one that’s left exposed.

Most of these requests are harmless in themselves; they just return a 404 error. But they indicate that your server is being probed, and a small fraction may be targeted attempts to exploit a real weakness. Understanding them helps you separate background noise from actual threats.

Why Do They Appear in Logs?

Your web server logs every request it receives, including those that fail. Bots and scanners don’t need permission to hit your site; they crawl the web continuously, looking for IP addresses and domains to test. They use lists of known vulnerable paths and common filenames. When they find a PHP file, they may send additional requests with malicious parameters, like ?cmd=id or ?file=/etc/passwd, to see if the script executes commands or reads sensitive files.

These scans are not personal. They target entire IP ranges or domains that appear in search engines. Even a brand-new site with no traffic can receive dozens of such requests within days of going live.

Common Patterns and Examples

Here are typical unknown PHP requests you’ll see and what they usually mean:

  • GET /wp-login.php — brute-force attempts on WordPress login pages.
  • POST /xmlrpc.php — used for amplification attacks or brute force via XML-RPC.
  • GET /shell.php or /cmd.php — direct attempts to access a web shell that might have been uploaded by a previous attacker.
  • GET /index.php?s=/index/\think\app/invokefunction — exploits for ThinkPHP framework vulnerabilities.
  • GET /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php — known PHPUnit RCE exploit.
  • GET /?file=../../../../etc/passwd — path traversal attempts to read system files.

These patterns repeat across millions of sites; they are not targeted at you specifically.

How to Tell If It’s a Real Threat

Most unknown PHP requests are benign, but some require attention. Look for these signs:

  • Requests to files that actually exist on your server, especially if they are not part of your application.
  • Repeated POST requests with large payloads to a single PHP file.
  • Requests that return HTTP 200 (success) instead of 404—that means the file exists and executed.
  • Unusual parameters like cmd, exec, shell, or base64-encoded strings.
  • Traffic from a single IP address with many different paths in a short time.

If you see a 200 response to a suspicious PHP file, check that file’s contents immediately. It may be a web shell left by an attacker. Also monitor server logs for outbound connections from your server, which could indicate a compromised script.

How to Protect Your Server

You can reduce the risk from these probes with basic hardening:

  1. Keep all software updated—PHP, web server, CMS, plugins, and themes.
  2. Remove unused files and directories, especially any that end in .php.
  3. Disable directory listing and restrict file execution in writable directories (e.g., uploads).
  4. Use a web application firewall (WAF) or mod_security rules to block common exploit patterns.
  5. Limit login attempts to prevent brute force.
  6. Use strong, unique passwords and change default admin usernames.
  7. Regularly scan your site for malware or unexpected files.

Also consider blocking or rate-limiting IPs that generate many 404s, but be careful not to block legitimate crawlers like Googlebot. You can use fail2ban or similar tools to automate this.

What Not to Do

Don’t panic and block all unknown requests—you’ll likely block legitimate traffic. Don’t disable PHP entirely; that would break your site. Don’t ignore 200 responses to suspicious files, as that could be an active compromise. Also, don’t rely solely on logs; use intrusion detection tools and regular backups to recover quickly if something goes wrong.

Frequently Asked Questions

Are unknown PHP requests always malicious?

No. Some are from security scanners (like Shodan or Censys) that index the web, or from broken links that point to old paths. However, the vast majority are automated exploit attempts. Even if they’re not malicious in intent, they’re not legitimate user traffic.

Should I block IPs that send these requests?

Blocking individual IPs is often futile because attackers rotate IPs. Instead, use rate limiting or a WAF to mitigate. Blocking entire countries or ranges can hurt legitimate visitors. Focus on patching vulnerabilities rather than blocking scanners.

My site is small—why am I being scanned?

Scanners don’t discriminate by size. They scan entire IP ranges and domain lists, so any site on the internet will be probed. Small sites are often easier targets because they may have outdated plugins or less security monitoring.

Can these requests slow down my server?

In normal volumes, no. A few hundred requests a day is negligible. But a distributed denial-of-service (DDoS) attack or a flood of POST requests could consume resources. If you notice performance issues, check your logs for spikes and consider rate limiting.

Should I delete the suspicious PHP files if they don’t exist?

If the file doesn’t exist, there’s nothing to delete. If you find a PHP file you didn’t create, remove it and investigate how it got there. Check file permissions and recent changes to your site.

Related

Formula used
in t | Time window | hours | 24 | 1
in n | Number of requests | count | 100 | 0
out rate | Requests per hour | req/h | n / t | 2
out interval | Average seconds between requests | s | (t * 3600) / n | 1

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.