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
PHP-FPM Primary script unknown Primary script unknown error
PHP-FPM server reached pm.max_children WARNING: [pool www] server reached pm.max_children setting (5), consider raising it warning
PHP-FPM slowlog permission denied ERROR: failed to open slowlog (/var/log/php-fpm/www-slow.log): Permission denied error
post_max_size exceeded and POST is empty POST Content-Length of %d bytes exceeds the limit of %d bytes warning
Required parameter follows optional parameter Deprecated: Required parameter $value follows optional parameter $format in %s on line %d notice
Return value must be of type Fatal error: Uncaught TypeError: findName(): Return value must be of type string, null returned in %s on line %d fatal
SameSite blocks PHP session cookie Cookie "%s" was rejected because it had the "SameSite=%s" attribute warning
Secure session cookie missing over HTTP Set-Cookie: %s; Secure warning
session_start called while a session is active Notice: session_start(): Ignoring session_start() because a session is already active notice
session_start cannot run after output Warning: session_start(): Session cannot be started after headers have already been sent warning
session_start open failed Warning: session_start(): open(/var/lib/php/sessions/sess_abc, O_RDWR) failed: Permission denied warning
set_exception_handler misses Throwable types TypeError: Argument #1 ($callback) must be a valid callback error
SQLSTATE 23000 duplicate entry SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'ada@example.test' for key 'users.email' error
SQLSTATE 23000 foreign key constraint fails SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails error
SQLSTATE 28000 access denied SQLSTATE[28000] [1045] Access denied for user 'app'@'%s' (using password: YES) fatal
SQLSTATE 40001 deadlock found SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction error
SQLSTATE 42000 SQL syntax error SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax error
SQLSTATE 42S02 table does not exist SQLSTATE[42S02]: Base table or view not found: 1146 Table 'app.orders' doesn't exist error
SQLSTATE 42S22 unknown column SQLSTATE[42S22]: Column not found: 1054 Unknown column 'user_nmae' in 'field list' error
SQLSTATE HY000 connection refused SQLSTATE[HY000] [2002] Connection refused fatal
SQLSTATE HY000 lock wait timeout SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction error
SQLSTATE HY000 MySQL socket not found SQLSTATE[HY000] [2002] No such file or directory fatal
SQLSTATE HY000 unknown database SQLSTATE[HY000] [1049] Unknown database 'inventory' fatal
SQLSTATE HY093 invalid parameter number SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens error
SQLSTATE IM001 driver does not support function SQLSTATE[IM001]: Driver does not support this function: driver does not support setting attributes error
Symfony service not found Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException: You have requested a non-existent service "app.report". fatal
Too few arguments to function Fatal error: Uncaught ArgumentCountError: Too few arguments to function sendMail(), 1 passed and exactly 2 expected in %s on line %d fatal
Too many arguments to function Fatal error: Uncaught ArgumentCountError: Too many arguments to function render(), 3 passed and exactly 2 expected in %s on line %d fatal
Trait not found Fatal error: Trait "App\\Support\\LogsEvents" not found in %s on line %d fatal
Trying to access array offset on null Warning: Trying to access array offset on null in %s on line %d warning
Trying to access array offset on value of type bool Warning: Trying to access array offset on value of type bool in %s on line %d warning
Trying to access array offset on value of type int Warning: Trying to access array offset on value of type int in %s on line %d warning
Trying to access array offset on value of type string Warning: Trying to access array offset on value of type string in %s on line %d warning
TypeError not caught by Exception Fatal error: Uncaught TypeError: %s in %s:%d fatal
Uncaught RuntimeException Fatal error: Uncaught RuntimeException: %s in %s:%d fatal
Unclosed brace Parse error: Unclosed '{' on line 9 in %s on line %d parse
Unclosed parenthesis Parse error: Unclosed '(' on line 17 in %s on line %d parse
Undefined array key Warning: Undefined array key "%s" in %s on line %d warning
Undefined constant Fatal error: Uncaught Error: Undefined constant "APP_ENV" in %s on line %d fatal
Undefined index Notice: Undefined index: email in %s on line %d notice
Undefined offset Notice: Undefined offset: 4 in %s on line %d notice
Undefined variable Warning: Undefined variable $userId in %s on line %d warning
Unexpected identifier Parse error: syntax error, unexpected identifier "return", expecting ";" in %s on line %d parse
Unexpected string content Parse error: syntax error, unexpected single-quoted string "host", expecting "]" in %s on line %d parse
Unexpected T_STRING Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in %s on line %d parse
Unexpected T_VARIABLE Parse error: syntax error, unexpected T_VARIABLE in %s on line %d parse
Unexpected variable Parse error: syntax error, unexpected variable "$name" in %s on line %d parse
Unsupported operand types Fatal error: Uncaught TypeError: Unsupported operand types: array + int in %s on line %d fatal
Uploaded file exceeds upload_max_filesize The uploaded file exceeds the upload_max_filesize directive in php.ini warning
Use of undefined constant assumed string Notice: Use of undefined constant status - assumed 'status' in %s on line %d notice

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.