PHP Errors & Logs articles

PHP Errors & Logs 308 Where the PHP error log is, how to read it, and the errors you will see most When a site breaks there are two ways to react: guess, or read what the server already wrote down. The second is...
PHP Errors & Logs 320 PHP warnings showing on your site: what they are and how to silence them At the top of the page, or in the middle of the dashboard, lines appear like Warning: ... in...
PHP Errors & Logs 241 Fixing “Allowed memory size exhausted” The full message reads “Allowed memory size of … bytes exhausted (tried to allocate … bytes)”. It means a single...
PHP Errors & Logs 228 Fixing “Maximum execution time exceeded” “Maximum execution time of N seconds exceeded” means the script took longer than PHP’s max_execution_time allows and...
PHP Errors & Logs 373 Fixing “Call to undefined function”: the extension that is missing The message “Call to undefined function name()” says the code called a function that the PHP of this folder does not...
PHP Errors & Logs 227 PHP sessions: where they live, and why users get logged out A PHP session is a small file on the server, tied to the visitor by a cookie (the PHPSESSID). That is where the...
PHP Errors & Logs 314 A blank page in PHP: how to see the error A white page means PHP hit a fatal error and is set not to show it. That is the right setting for a public site,...
PHP Errors & Logs 207 Cannot modify header information, headers already sent: finding the line that caused it The full message is “Warning: Cannot modify header information - headers already sent by (output started at...
PHP Errors & Logs 343 File upload fails with failed to open stream or move_uploaded_file: the causes, in order The file reaches the server, PHP stores it in a temporary folder and your code tries to move it to its final place...
PHP Errors & Logs 213 Errors after moving to PHP 8: undefined array key, null parameters and dynamic properties You moved the site to PHP 8 and new messages appear. Nearly all come from the same place: PHP 8 became less tolerant...
PHP Errors & Logs 263 Writing your own log from PHP: error_log and a log file you can read When something fails only in production, your best ally is a log your own code writes: one line with the time, what...
PHP Errors & Logs 252 The wrong date or time on your site or e-mails: WordPress, PHP and time zones The short answer: “the time is wrong” can come from four places, and fixing one does not fix the others: WordPress...
PHP Errors & Logs 227 Accents turning into strange symbols on your site: UTF-8 from file to database The short answer: “ação” shows as “ação”, or as “a��o”, or as “a?o”. It is always the same problem: the text was...