PHP Error Library

Practical PHP error explanations with causes, diagnosis steps, and modern fixes.

Paste your PHP error

Paste a fatal, warning, SQLSTATE, or cURL message. Paths and line numbers are normalized and are not stored.

Open full Error Matcher

PHP errors are often more actionable than they look—if you know which fragment of the message matters. This library focuses on real diagnostic workflows: isolate the message, identify the subsystem, reproduce with the smallest input, then apply a fix that survives PHP upgrades.

Paste a full fatal/warning into the matcher, browse categories such as Composer, Xdebug, PHP-FPM, Apache, nginx, and database/SQLSTATE issues, or filter by PHP version and environment. Every guide starts near the answer—no generic “PHP is popular” filler.

Cross-link into the PHP Error Matcher, Configuration Inspector, and Composer Platform Checker when text analysis helps more than another prose page.

Browse by category

Syntax & Parse

8 guides

Parser and tokenization failures.

Variables & Constants

4 guides

Variable scope and constant lookup.

Arrays

7 guides

Array keys, offsets, and shapes.

Strings

2 guides

String operations and encoding.

Functions

7 guides

Function declarations and calls.

Classes & Objects

9 guides

Object model and property failures.

Namespaces & Autoload

4 guides

Name resolution and loading.

Type Errors

10 guides

Runtime type contract violations.

Exceptions

4 guides

Thrown and uncaught exceptions.

Warnings & Notices

9 guides

Non-fatal runtime diagnostics.

Deprecated

2 guides

Version migration deprecations.

Filesystem

3 guides

File paths, permissions, and streams.

Uploads

3 guides

HTTP upload handling.

Sessions & Cookies

7 guides

Session persistence and cookies.

Headers & Output

4 guides

HTTP output ordering.

JSON

4 guides

JSON parsing and encoding.

Date & Time

2 guides

Timezone and date processing.

Memory & Performance

4 guides

Resource and execution limits.

Composer

17 guides

Dependency and autoload tooling.

PDO

4 guides

PDO drivers and statements.

MySQL & MariaDB

10 guides

Database server errors.

Database Connections

4 guides

Connection and authentication.

cURL & HTTP

3 guides

Outbound HTTP transfers.

SSL Certificates

1 guides

TLS trust and certificates.

PHP Extensions

3 guides

Extension loading and availability.

PHP-FPM

8 guides

FastCGI process management.

Apache

4 guides

Apache PHP integration.

nginx

4 guides

nginx FastCGI integration.

Xdebug

9 guides

Xdebug diagnostics.

OPcache

3 guides

Bytecode cache configuration.

CLI

5 guides

Command-line PHP.

Cron

3 guides

Scheduled PHP tasks.

WordPress PHP

2 guides

WordPress runtime integration.

Laravel PHP

2 guides

Laravel container and runtime.

Symfony PHP

1 guides

Symfony services and runtime.

Zend & Laminas

2 guides

Zend Studio and Laminas runtime.

Legacy PHP

6 guides

Removed and historical behavior.

PHP Version Compatibility

3 guides

Cross-version migration failures.

php.ini

9 guides

PHP configuration directives.

Filter the library

162 matching guides

Title Pattern Severity
display_errors change does not show startup errors display_errors => Off => Off warning
Division by zero Fatal error: Uncaught DivisionByZeroError: Division by zero in %s on line %d fatal
Failed to open stream no such file Warning: require(%s): Failed to open stream: No such file or directory warning
Failed to open stream permission denied Warning: file_put_contents(%s): Failed to open stream: Permission denied warning
File was only partially uploaded The uploaded file was only partially uploaded warning
Function disabled by disable_functions Fatal error: Uncaught Error: Call to undefined function %s() fatal
Implicit conversion loses precision Deprecated: Implicit conversion from float 8.5 to int loses precision in %s on line %d notice
Interface not found Fatal error: Uncaught Error: Interface "App\\Contracts\\Exporter" not found in %s on line %d fatal
It is not safe to rely on system timezone Warning: date(): It is not safe to rely on the system's timezone settings warning
JSON malformed UTF-8 JsonException: Malformed UTF-8 characters, possibly incorrectly encoded error
JSON maximum stack depth exceeded JsonException: Maximum stack depth exceeded error
JSON recursion detected JsonException: Recursion detected error
JSON syntax error JsonException: Syntax error error
Laminas module could not be initialized Laminas\\ModuleManager\\Exception\\RuntimeException: Module (App) could not be initialized. fatal
Laravel facade root has not been set RuntimeException: A facade root has not been set. fatal
Laravel target class does not exist Illuminate\\Contracts\\Container\\BindingResolutionException: Target class [App\\Services\\Report] does not exist. fatal
Lost connection to MySQL server during query SQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server during query error
max_input_vars truncates form data Warning: Unknown: Input variables exceeded %d warning
Maximum execution time exceeded Fatal error: Maximum execution time of %d seconds exceeded in %s on line %d fatal
Modulo by zero Fatal error: Uncaught DivisionByZeroError: Modulo by zero in %s on line %d fatal
MySQL commands out of sync SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active error
MySQL server has gone away SQLSTATE[HY000]: General error: 2006 MySQL server has gone away error
New PHP syntax used on an older runtime Parse error: syntax error, unexpected token "%s" in %s on line %d fatal
nginx connect failed connection refused connect() failed (111: Connection refused) while connecting to upstream error
nginx No input file specified No input file specified. error
nginx upstream sent too big header upstream sent too big header while reading response header from upstream error
nginx upstream timed out upstream timed out (110: Connection timed out) while reading response header from upstream error
Object could not be converted to string Fatal error: Uncaught Error: Object of class App\\Value\\Money could not be converted to string in %s on line %d fatal
OPcache file cache permission denied Fatal Error Unable to open base address file fatal
OPcache insufficient shared memory Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) warning
OPcache serves stale PHP files after deployment OPcache cached script timestamp is older than deployed file: %s warning
open_basedir restriction in effect Warning: file_exists(): open_basedir restriction in effect. File(/etc/passwd) is not within the allowed path(s) warning
Optional parameter before required parameter Deprecated: Optional parameter $format declared before required parameter $value is implicitly treated as a required parameter in %s on line %d notice
Output buffering does not fix header ordering Warning: Cannot modify header information - headers already sent by (output started at %s:%d) warning
Parse error: syntax error, unexpected token Parse error: syntax error, unexpected token "%s" in %s on line %d parse
Parse error: unexpected end of file Parse error: syntax error, unexpected end of file in %s on line %d parse
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
PDO could not find driver PDOException: could not find driver fatal
PHP @ error suppression hides the root cause @%s suppresses a PHP diagnostic warning
PHP CLI argc or argv is missing Warning: Undefined variable $argv warning
PHP CLI loads a different php.ini Loaded Configuration File => %s warning
php command not found %s: php: command not found error
PHP error_reporting hides warnings error_reporting() returns %d but expected E_ALL warning
PHP process cannot allocate memory mmap() failed: Cannot allocate memory fatal
PHP reports no loaded php.ini Loaded Configuration File => (none) warning
PHP shebang bad interpreter %s: %s: bad interpreter: No such file or directory error
PHP Startup unable to load dynamic library PHP Warning: PHP Startup: Unable to load dynamic library 'redis' warning
PHP warning not handled correctly Warning: %s in %s on line %d warning
PHP-FPM address already in use ERROR: unable to bind listening socket for address '%s:9000': Address already in use error
PHP-FPM pool seems busy WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers) warning

FAQ

How should I search for a PHP error?

Paste the distinctive message fragment or the full fatal/warning line. Dynamic paths and line numbers are normalized automatically.

Are these pages replacements for the PHP manual?

No. They are practical troubleshooting guides that complement php.net, Composer, Xdebug, and server documentation.