PHP errors: understand them and fix them step by step
Find the message you see on your screen or in your log.
Which PHP version does your site report?
We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.
More about this
Each guide explains what it means, what usually causes it and what you can safely try yourself.
WordPress: CVE-2026-119977 added to KEV
CISA added CVE-2026-119977 (WordPress Core, a race condition in the upgrade process) to its Known Exploited Vulnerabilities catalog on November 3, 2026. The deadline for US federal agencies was November 6, 2026. According to NVD, WordPress 4.7 through 7.1.3 is affected: during a full core upgrade, WordPress uses predictable staging paths that are reachable from the web, which lets an unauthenticated attacker execute code on the server during that upgrade window.
This concerns WordPress, not PHP itself.
The fix has been available in WordPress 7.1.4 since October 28, 2026. WordPress also backported the security fixes to every older branch that still receives security updates (through 4.7). Check which version you run under Updates in your dashboard and install 7.1.4 or the latest security release of your branch.
The notice does not establish whether your site has been exploited.
Sources for the WordPress notice
Sources checked: November 9, 2026.
Magento: CVE-2026-48356 added to KEV
CISA added CVE-2026-48356 (Adobe Commerce and Magento, unrestricted upload of a file with a dangerous type) to its Known Exploited Vulnerabilities catalog on October 27, 2026 (catalog 2026.10.27). The deadline for US federal agencies is November 10, 2026. This concerns Magento, not PHP itself.
If you run a Magento store, read Adobe bulletin APSB26-73 and install the patch or mitigation. It has been available since July 14, 2026 (APSB26-73, July releases). The notice does not establish whether your store has been exploited.
Sources for the Magento notice
Sources checked: October 28, 2026.
Error guides
Pick the guide that matches your message. Not sure which one it is? Start with the overview of common PHP errors.
- WordPress 508 Resource Limit: Causes and Next StepsA 508 Resource Limit Is Reached message can stop your WordPress site. Find the hosting limit involved, check the cause and plan a lasting fix.
- Argument must be of type after a PHP upgradeArgument must be of type after an upgrade? Identify the rejected argument, trace its source and test validation that preserves the meaning of the input.
- Fix array_key_exists receiving an object in PHPArray_key_exists expects an array but receives an object? Check the data source and distinguish missing keys, empty values and object properties.
- Trying to access array offset on null in WordPressArray offset on null after a PHP upgrade? Trace the missing collection and test empty results separately from failed lookups with five repair steps.
- Fix Array to string conversion in WordPressArray to string conversion in WordPress? Trace why a list reaches a text field and repair form output, product fields or templates without losing choices.
- __autoload() no longer supported after a PHP update__autoload() is no longer supported? Locate the legacy class loader and test its replacement alongside the loaders your application already uses.
- Fix Cannot assign to property of type in PHPCannot assign to property of type in PHP? Trace the rejected value and repair input handling for a typed property without losing saved information.
- Cannot redeclare after a PHP upgradeCannot redeclare after a PHP upgrade? Compare both definitions, investigate duplicate snippets or files and test which code your website needs.
- Class not found after a PHP upgradeClass not found after a PHP upgrade? Check missing files, autoloading and package versions before replacing code or libraries in a live installation.
- Fix Serialization of Closure is not allowedSerialization of Closure is not allowed in PHP? Find the callback inside stored data and test a repair that preserves the required task information.
- Composer memory exhausted after a PHP upgradeComposer stops with Allowed memory size after a PHP upgrade? Check the terminal PHP version, its memory limit and the exact installation step that fails.
- count() TypeError after a PHP 8 upgradecount(): argument must be Countable or array after PHP 8? Trace the unexpected input and repair the data flow without silently counting failures as zero.
- create_function() missing after PHP upgradecreate_function() missing after PHP upgrade? Trace the cause with five repair steps, focused checks and sources from the PHP manual.
- WordPress: There Has Been a Critical Error on This WebsiteSeeing 'There has been a critical error on this website'? Find the cause, use recovery mode and fix the error step by step.
- ctype_digit(): non-string argument is deprecatedctype_digit() warns about non-string input? Identify the intended character or number and test validation before applying a type conversion.
- cURL SSL certificate problem after a PHP upgradecURL or OpenSSL reports a certificate error after a PHP upgrade? Check configuration and certificate trust without turning off connection verification.
- Curly braces offset error after a PHP upgradeCurly braces offset error after a PHP upgrade? Trace the cause with five repair steps, focused checks and sources from the PHP manual.
- WordPress Database Connection Error: What to CheckWordPress cannot connect to its database? Check the connection settings, hosting status and PHP extensions safely before changing or restoring anything.
- Declaration must be compatible: fix the PHP errorDeclaration must be compatible after a PHP update? Compare plugin and parent method signatures and test a supported combination of components.
- PHP Deprecated Warnings in PHP 8.x: What They MeanA PHP Deprecated warning means your code uses a feature PHP plans to remove. See which warnings matter after a PHP 8 upgrade and how to fix them safely.
- How to Show PHP Errors and Read the Error LogShow PHP errors and read the error log: where the log lives, what to look for and how to switch display off again safely.
- DivisionByZeroError: PHP calculation failsDivisionByZeroError after a PHP update? Trace the zero divisor and test empty data without returning an invented result as a successful calculation.
- Using ${var} in strings is deprecated in PHPUsing ${var} in strings is deprecated? Review variables in text templates and preserve the intended output when updating interpolation syntax.
- Fix duplicate backed enum values in PHPDuplicate value in enum in your PHP log? Identify conflicting cases, check stored values and test the corrected mapping before releasing the repair.
- Dynamic property deprecated in PHP 8.2: fix the causeCreation of dynamic property appears from PHP 8.2. Find the affected plugin or class and plan a compatible fix instead of simply hiding the warning.
- Call to undefined function each() after PHP upgradeCall to undefined function each() after PHP upgrade? Trace the cause with five repair steps, focused checks and sources from the PHP manual.
- Fix automatic conversion of false to array in PHPAutomatic conversion of false to array is deprecated? Trace the false value and repair list handling without disguising a failed lookup as an empty result.
- PHP Fatal Error: What It Means and How to Fix ItPHP Fatal error: Uncaught Error stops your page from loading. Read the message, find the file and line, and try safe fixes, starting with the plugin.
- fgetcsv(): missing explicit escape after a PHP updatefgetcsv() warns that escape must be explicit? Review the CSV format and test quoted fields before changing the settings used by your importer.
- Fix float to int precision loss notices in PHPImplicit conversion from float to int loses precision? Check rounding, quantities and array keys before changing how your PHP code converts numbers.
- foreach() argument must be of type array|objectforeach() received neither an array nor an object? Trace the supplied value and separately test several items, zero items and failed processing.
- Fix removed get_magic_quotes_gpc in PHP 8Call to undefined function get_magic_quotes_gpc after PHP 8? Locate outdated input processing and test text fields after a targeted update.
- Headers already sent after a PHP upgradeCannot modify header information after a PHP upgrade? Find the first output, check earlier warnings and repair redirects or sessions step by step.
- HTTP 500 Internal Server Error in PHP: How to Fix ItAn HTTP 500 error on a PHP site hides the real cause. Check the error log, .htaccess and plugins to find it.
- Implicitly nullable parameter warning in PHPImplicitly marking parameter as nullable is deprecated? Declare null explicitly while preserving the intended behaviour of optional input.
- implode(): argument order error after PHP upgradeimplode(): argument order error after PHP upgrade? Trace the cause with five repair steps, focused checks and sources from the PHP manual.
- Fix must be a valid callback after a PHP updateMust be a valid callback after a PHP update? Check the registered function, loading order and method used by your WordPress extension or custom code.
- Investigate JsonException in PHPJsonException in a PHP integration? Inspect the JSON operation and error code, then test valid and rejected input before resuming a form or import.
- WordPress Stuck in Maintenance Mode: Safe RecoveryWordPress still says it is unavailable for scheduled maintenance? Check whether an update stopped, remove the leftover file safely and finish the update.
- Maximum execution time after a PHP upgradeMaximum execution time exceeded after a PHP upgrade? Identify the interrupted task, measure execution and inspect partial results before retrying.
- Call to a member function on null in WordPressCall to a member function on null in WordPress? Find the missing object, choose appropriate handling and verify the visitor journey in five steps.
- Allowed Memory Size Exhausted in PHP: How to Fix ItAllowed memory size exhausted means PHP ran out of memory. See what causes it and how to raise memory_limit safely.
- mysql_connect() missing after a PHP upgrademysql_connect() missing after a PHP upgrade? Trace the cause with five repair steps, focused checks and sources from the PHP manual.
- Fix mysqli_sql_exception after a PHP updateUncaught mysqli_sql_exception after PHP 8.1? Investigate the database failure and exception handling without hiding errors or overwriting stored data.
- Non-static method cannot be called statically: fixNon-static method cannot be called statically: fix? Trace the cause with five repair steps, focused checks and sources from the PHP manual.
- Passing null to parameter of type string is deprecatedPassing null to parameter of type string? Identify the parameter, distinguish null from empty text and repair how missing input is handled.
- Common PHP Errors: What They Mean and Where to StartCommon PHP errors in one place: what the message means, likely causes and where to start fixing it.
- PHP Notice and Warning Messages ExplainedPHP notices and warnings explained: what they mean, when they matter and how to fix them without hiding them.
- WordPress Plugin Conflict After a PHP UpdateA plugin breaks your WordPress site after a PHP update. Find the conflicting plugin and get the site working again.
- Fix positional argument after named argument in PHPCannot use positional argument after named argument? Fix PHP argument order and verify that each supplied value still reaches the intended parameter.
- Attempt to read property on null in WordPressAttempt to read property on null? Trace the absent object, distinguish empty fields and check that displayed labels and subsequent actions stay correct.
- Fix Cannot modify readonly property in PHPCannot modify readonly property in PHP? Trace the second assignment and test a targeted repair while preserving the intended object lifecycle.
- Required parameter follows optional after a PHP upgradeRequired parameter follows optional? Review the function contract and its callers before removing defaults or moving parameters after a PHP upgrade.
- Uncaught TypeError: return value after a PHP upgradeUncaught TypeError with Return value must be of type? Trace the function output and test successful, empty and failed results separately.
- Serializable is deprecated: stored PHP objectsSerializable deprecation after a PHP update? Review storage methods and test existing data before changing how application objects are serialized.
- Website Down After a PHP Update: What to Check FirstYour website went down after a PHP update? Check what changed, find the error and roll back or fix it without guessing.
- Fix strftime deprecated after a PHP updatestrftime() is deprecated in PHP? Replace date formatting according to language and time zone, then check calendar and confirmation output.
- Return type should be compatible: PHP 8.1 noticeReturn type should either be compatible in PHP? Check an internal interface implementation and verify the values returned along every relevant path.
- WordPress Theme Breaks on PHP 8: What to DoYour WordPress theme breaks on PHP 8. See which code fails, how to check compatibility and what to do next.
- ArgumentCountError: Too few arguments in WordPressToo few arguments in WordPress? Compare the caller with the function, trace missing input and test each affected route with five repair steps.
- Typed property must not be accessed before initializationTyped property not initialized? Check object creation, assignment and first access, then test both new objects and objects built from stored data.
- Uncaught ValueError after a PHP upgradeUncaught ValueError after a PHP upgrade? Trace the cause with five repair steps, focused checks and sources from the PHP manual.
- Undefined array key after a PHP upgradeUndefined array key after a PHP upgrade? Trace the missing field, distinguish absent from empty values and test normal and incomplete input.
- Uncaught Error: Undefined constant after PHP upgradeUncaught Error: Undefined constant after PHP upgrade? Trace the cause with five repair steps, focused checks and sources from the PHP manual.
- Undefined function after a PHP upgradeSeeing Call to undefined function after a PHP upgrade? Check missing extensions, removed functions and outdated plugin code before changing your site.
- Warning: Undefined variable in WordPressUndefined variable after a PHP upgrade? Trace assignments, check scope and conditions, and test the affected page with and without input.
- Fix UnhandledMatchError in PHPUnhandledMatchError in PHP? Check missing match arms and input types, then test recognized and unknown values without introducing a false success result.
- Unknown named parameter after a PHP updateUnknown named parameter in PHP? Check parameter names and associative argument arrays before changing the way a plugin calls another function.
- Unparenthesized ternary error after updating PHPUnparenthesized ternary is not supported? Establish the intended decision order and test every outcome before changing parentheses in old code.
- Unsupported operand types after a PHP upgradeUnsupported operand types after a PHP upgrade? Inspect the values used in the calculation and test amounts, empty input and invalid data separately.
- Fix utf8_encode deprecated and preserve textutf8_encode() is deprecated after a PHP update? Identify the real source encoding before changing imports, exports or product descriptions.
- PHP White Screen of Death: Causes and FixesA blank white page on your PHP or WordPress site? Find out what causes the white screen of death and how to bring your site back.
- WooCommerce Allowed memory size after a PHP upgradeWooCommerce Allowed memory size after an upgrade? Measure the affected store action, check the active limit and test orders and imports carefully.
- WordPress Outage: Find the Cause and Recover SafelyA blank screen, error or unavailable WordPress site? Check hosting, recent changes and logs, then choose the next step without adding another unknown.
- WordPress: PHP does not meet minimum requirementsWordPress or a plugin rejects your PHP version? Compare the actual server version with that component’s requirement and prepare a tested upgrade.
Where to start
Every guide follows the same order, because it keeps you from making things worse. First you make a backup of the files and the database, so every step can be undone. Then you read the error log instead of showing errors on the live site, since on-screen messages can reveal details about your server.
Next you note the error type, the file and the line, and check which PHP version the site runs.
Many errors start right after an update of PHP, a plugin or a theme. In that case the lasting fix is updating or replacing the old code, and running a PHP version that still receives security fixes.
Share this page
Ask your AI to explain
Opens the chat with a question about this page. An AI answer can differ; the sources above are leading.
This question is sent along: Summarise the confirmed facts on https://websitewithoutphp.com/en-us/php-errors/ in 5 short points, with the source per point.
- Domain
- Check
- Result
- Report
We are checking
We only read what your site already sends in public. This takes a few seconds.
- Looking up the domain
- Connecting to your site
- Reading the headers
- Identifying the platform
- Identifying the CDN or firewall
Adds platform, firewall or CDN, hosting and your previous scan. We add your result to the form. A person replies within 1 business day.
Ask a person to take a look
- Domain
- Result
Details
- Website
- PHP
- PHP version
- Checked
Headers we looked at
What this does not tell you
Read how to find your PHP version yourself
Ask your hosting provider
Copy this question and send it to your hosting provider or developer. You do not need to give us an email address for this.
Which PHP version does this website use, and how do I check that in my hosting panel?
Where should we send your report?
You see the report below. The email version, ready to forward to your web developer, follows.
Your full report
- Website
- PHP
- PHP version
- Platform
- Firewall/CDN
- Hosting
- Previous scan
We add your result to the form. A person replies within 1 business day.