Developer tool

Config Diff

Compare two configuration text blobs line-by-line to spot drift between environments.

How it works

What it does

Config Diff performs a line-oriented comparison between two pasted configuration texts—php.ini excerpts, FPM pools, Nginx blocks, or env-style files—and highlights additions, removals, and changes. It is built for environment drift investigations.

When to use it

  • “Works on staging” configuration mismatches
  • Reviewing a proposed ini change before deploy
  • Comparing sanitized production vs local samples

How input is processed safely

Both inputs are treated as plain text under size limits. No configs are written to disk as active server settings, and no shell diff binaries are needed beyond controlled comparison logic. Prefer redacted snippets over entire secret-bearing files.

Examples

  • Staging memory_limit=256M vs production 128M
  • OPcache enabled in one environment only
  • Whitespace-only changes called out so you can ignore noise

Common mistakes

  • Diffing full phpinfo HTML dumps full of transient values
  • Leaving passwords in env files before pasting
  • Comparing unordered dumps where line order is meaningless—normalize first

Drift accumulates when emergency hotfixes are applied by hand on one host. A line-oriented diff makes those emergencies visible again. Normalize away comments and blank lines when they obscure real changes, but do not ignore a commented-out directive that changes runtime behavior when uncommented elsewhere.

For structured formats, consider sorting keys offline before diffing if order is insignificant. For ini files, section headers matter—compare the same sections.

Store sanitized “golden” configs in your infrastructure repo so diffs become routine pull requests instead of production archaeology.

Practical tips

  • Keep inputs small and representative; huge pastes slow feedback and raise risk of accidental secret disclosure.
  • After using Config Diff, verify the result in your own environment (correct SAPI, correct host, correct project root).
  • Cross-link findings to ZendStudio.net PHP error guides and IDE setup pages when the next step is configuration rather than code edits.
  • Prefer repeatable project tooling (CI, Composer scripts, IDE inspections) for repo-wide enforcement; this page is for interactive problem-solving.

Privacy note

Configs frequently contain secrets. Remove credentials, API keys, and private URLs before pasting either side.

Run in browser

AJAX processing only. No remote PHP execution sandbox. Results are not indexed.

Remove secrets before pasting. Max ~200KB per side.

Inputs are processed for this request only and are not stored in analytics. Object unserialize and arbitrary PHP execution are blocked.

Safety notes

  • Submitted tool contents are not written to analytics or search logs.
  • This site never evaluates arbitrary PHP from the browser.
  • Generated configs are starting points—validate on a staging host before production.