PHP troubleshooting and modernization

Errors, configuration, Composer, debugging, FPM, and legacy modernization paths for working PHP developers.

Use this hub to move from a concrete failure (error message, misconfigured SAPI, Composer conflict) into the right library—errors, tools, or modernization guides.

Migration & compatibility

Composer

Zend Framework / Laminas

Configuration & runtime

Testing

Errors

Open the PHP Error Library when you have a distinctive message to match. Prefer modernization guides when the intent is “upgrade this app,” not “decode this stack line.”

Troubleshooting topics

Diagram of browser to Apache or nginx to PHP-FPM to application to database
Request path: web server → PHP-FPM → application → database

PHP error guides

Title Pattern Severity
Call to undefined function each Fatal error: Uncaught Error: Call to undefined function each() in %s on line %d fatal
Call to undefined function mysql_connect Fatal error: Uncaught Error: Call to undefined function mysql_connect() in %s on line %d fatal
Passing null to non-nullable internal parameter is deprecated Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d notice
Creation of dynamic property is deprecated Deprecated: Creation of dynamic property App\\Entity\\Order::$total is deprecated in %s on line %d notice
Class not found Fatal error: Uncaught Error: Class "%s" not found in %s:%d fatal
post_max_size exceeded and POST is empty POST Content-Length of %d bytes exceeds the limit of %d bytes warning
Xdebug legacy port 9000 mismatch Xdebug: [Step Debug] Could not connect to debugging client. Tried: %s:9000 warning
Xdebug Docker client host unreachable Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:%d warning
Xdebug could not connect to debugging client Xdebug: [Step Debug] Could not connect to debugging client. Tried: %s:%d warning
Class not found after Composer install Class "%s" not found error
Undefined array key Warning: Undefined array key "%s" in %s on line %d warning
OPcache serves stale PHP files after deployment OPcache cached script timestamp is older than deployed file: %s warning

Guides by OS, framework & workflow

Developer tools

Apache .htaccess Generator

Generate Apache .htaccess snippets for front controllers, HTTPS, www rules, caching, and denials.

Base64 Encode / Decode

Encode text to Base64 or decode Base64 back to readable text for debugging headers, tokens, and serialized blobs.

Composer Platform Checker

Paste composer.json to list PHP constraints and ext-* platform requirements without running Composer.

Composer Version Constraint Explainer

Explain Composer semver constraints and test whether specific versions satisfy them.

Composer.json Validator

Validate composer.json structure and common mistakes without running composer install.

Config Diff

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

Cron Expression Helper

Explain and build five-field Unix cron expressions for PHP schedulers and system crontab.

Docker PHP + Xdebug Generator

Generate Dockerfile, xdebug.ini, and Compose fragments for PHP with Xdebug 3.

Hash Generator

Generate non-password digests (SHA family and friends) for checksums and fingerprinting.

JSON Formatter

Validate, pretty-print, and minify JSON in the browser without sending payloads to a server.

JSON to PHP Access Helper

Generate PHP array access examples from JSON samples and optional path expressions.

Legacy PHP Risk Checker

Paste PHP source for a static scan that classifies removed APIs, deprecated calls, and security-sensitive legacy patterns—without executing…

Nginx + PHP-FPM Generator

Generate Nginx server snippets that pass PHP to PHP-FPM over a Unix socket or TCP upstream.

OPcache Config Generator

Suggest a conservative OPcache starting configuration from host RAM and workload hints.

PHP Array ↔ JSON Converter

Convert between JSON and PHP array literals using a restricted parser—no eval and no variable execution.

PHP Configuration Inspector

Paste php --ini output or selected directive lines to identify loaded ini files and key limits.

PHP Deprecated Checker

Find deprecated functions and patterns in pasted PHP to prioritize modernization work.

PHP Environment Compare

Compare two PHP environment summaries to find directive and extension mismatches.

PHP Error Matcher

Paste a full PHP error, warning, SQLSTATE, or cURL message to find the best ZendStudio.net troubleshooting guides.

PHP Error Reporting Generator

Build error_reporting, display_errors, and log_errors snippets for development and production.

PHP Formatter

Reindent and normalize PHP source formatting for readability without executing the code.

PHP Memory Calculator

Reason about memory_limit sizing and interpret Allowed memory size exhausted messages.

PHP Minifier

Compress PHP source by removing unnecessary whitespace for compact storage or transport demos.

PHP Modernization Roadmap

Build an ordered migration stage list from your PHP version, framework, Composer, database API, and deployment choices—linked to real ZendS…

PHP Password Hash Tool

Generate and verify password_hash()/password_verify() examples using modern PHP password APIs.

PHP Regex Tester

Test PCRE regular expressions against sample subjects the way PHP preg_* functions would match.

PHP Serialize Encoder

Encode simple structured values into PHP serialize() format for fixtures and interoperability tests.

PHP Serialize Viewer

Safely inspect PHP serialized strings as a readable tree without executing PHP on the server.

PHP Syntax Checker

Paste PHP source to find parse/syntax problems without executing any code on the server.

PHP Upload Limit Calculator

Calculate coherent upload_max_filesize, post_max_size, and related layers for Apache/Nginx + PHP.

PHP Version Compatibility Checker

Scan pasted PHP for version-sensitive syntax and APIs to plan upgrades across PHP releases.

PHP-FPM Config Generator

Generate a PHP-FPM pool configuration file from pool name, socket/listen settings, and process manager options.

PHP-FPM Pool Calculator

Estimate pm.max_children and related pool sizing from RAM, average worker usage, and reserve.

PHP.ini Generator

Generate practical php.ini starting points for development, production, WordPress, uploads, CLI, and API presets.

PSR-4 Autoload Checker

Check whether class paths match composer.json PSR-4 namespace prefixes.

Regex Explainer

Explain regular expression tokens and structure in plain language for PHP/PCRE patterns.

Unix Timestamp Converter

Convert Unix epoch seconds to human-readable UTC/local time and back for log correlation and API testing.

URL Encode / Decode

Percent-encode query strings or decode encoded URLs when debugging redirects, forms, and API clients.

UUID Generator

Generate UUIDs for application keys, test fixtures, and API identifiers.

Xdebug Config Generator

Generate Xdebug 3 (modern) or historical Xdebug 2 ini snippets for step debugging setups.

Xdebug Troubleshooter

Walk through common Xdebug connection failures with structured checks and likely fixes.

Frequently asked questions

Is this a full PHP tutorial site?
No. The PHP hub organizes troubleshooting paths—errors, configuration, Composer, debugging, PHP-FPM, and web servers—rather than teaching PHP from scratch.
Where should I paste a runtime error?
Use the PHP Error Library matcher on /php-errors/ or the PHP Error Matcher tool. Paste the distinctive message; paths and line numbers are normalized.