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
- Modernize hub
- PHP version migration center
- PHP 5 → modern PHP
- PHP 7 → PHP 8
- Removed functions
- Deprecated features
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
Variables & Constants
Arrays
Strings
Functions
Classes & Objects
Namespaces & Autoload
Type Errors
Exceptions
Warnings & Notices
Deprecated
Filesystem
Uploads
Sessions & Cookies
Headers & Output
JSON
Date & Time
Memory & Performance
Composer
PDO
MySQL & MariaDB
Database Connections
cURL & HTTP
SSL Certificates
PHP Extensions
PHP-FPM
Apache
nginx
Xdebug
OPcache
CLI
Cron
WordPress PHP
Laravel PHP
Symfony PHP
Zend & Laminas
Legacy PHP
PHP Version Compatibility
php.ini
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
- Abandoned Composer Packages in Legacy Apps Detect abandoned dependencies, evaluate forks and replacements, and schedule removals so CVEs and P…
- Adding Composer to a Legacy PHP Project Introduce composer.json, a lockfile, and vendor/autoload.php into an existing application while kee…
- Apache mod_php to PHP-FPM Modernization Move legacy Apache mod_php hosts to php-fpm via proxy_fcgi with clear process isolation, sockets, p…
- Composer Modernization Center Add Composer to legacy PHP projects, migrate includes to autoloading, set platform constraints, and…
- Composer Platform Constraints for Real Servers Align require.php, config.platform, and extension requirements with the PHP you actually run—withou…
- Containerize Legacy PHP Applications Use Docker to pin PHP versions and extensions for legacy apps when it improves parity—without prete…
- Deprecated PHP Features Hub Track deprecations that become fatals later: dynamic properties, null parameters, utf8_encode/decod…
- Dynamic Properties Deprecated in PHP 8.2 Why creating undeclared object properties warns in PHP 8.2, and how to declare properties or opt in…
- How to Determine the PHP Version in Production Reliable ways to identify the PHP version actually serving web and CLI traffic—including panels, co…
- Incremental Modernization for Legacy PHP Upgrade inherited PHP systems gradually with facades, adapters, routing seams, and staged Composer…
- Inheriting a Legacy PHP Application A first-30-days playbook for developers handed an unfamiliar PHP codebase: runtime truth, risk tria…
- Legacy PHP Application Audit Checklist Interactive browser checklist for inherited PHP apps: runtime, framework, Composer, DB, sessions, F…
- Legacy PHP CLI and Cron Modernization Run cron and CLI PHP with the correct binary, ini, working directory, locking, and logging so sched…
- Legacy PHP Project Structure Modernization Separate the public document root from application code and adopt a practical public/src/config/sto…
- Managing Legacy Composer Dependencies Operational strategies for abandoned packages, platform pins, forks, security advisories, and PHP v…
- Manual Includes to Composer Autoloading Stage a migration from require/include trees to Composer classmap and PSR-4 without deleting every…
- Migrating from PHP 5 to PHP 7 Practical PHP 5→7 upgrade focus: removed ext/mysql and ereg, engine changes, and why 7.4 is often t…
- Migrating from PHP 5 to PHP 8 End-to-end view of jumping PHP 5 codebases toward supported PHP 8.x without skipping mechanical rem…
- Migrating from PHP 7.4 to PHP 8 Focused upgrade notes for the common PHP 7.4 production baseline moving onto PHP 8.x.
- Migrating from PHP 8.0 to PHP 8.1 PHP 8.1 upgrade notes: resource-to-object migrations, null parameter deprecations, mysqli exception…
- Migrating from PHP 8.1 to PHP 8.2 PHP 8.2 upgrade focus: dynamic properties deprecation, utf8_encode/decode, locale-insensitive strin…
- Migrating from PHP 8.2 to PHP 8.3 PHP 8.3 upgrade notes highlighting range() changes, negative array index behavior, Date exceptions,…
- Migrating from PHP 8.3 to PHP 8.4 PHP 8.4 upgrade guidance: exit()/die() behavior, E_STRICT removal, JIT defaults, and sharper ValueE…
- Migrating from PHP 8.4 to PHP 8.5 PHP 8.5 upgrade notes based on the official migration85 incompatible changes: Opcache built-in, cas…
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.