{"success":true,"name":"read-php-error-logs-instead-of-guessing-at-blank-pages","description":"A PHP page shows blank, 500, or partial output with no message","category":"ai-brimind","path":"ai-brimind/read-php-error-logs-instead-of-guessing-at-blank-pages/SKILL.md","file":"SKILL.md","content":"---\nname: read-php-error-logs-instead-of-guessing-at-blank-pages\ndescription: \"A PHP page shows blank, 500, or partial output with no message\"\n---\n\n# Read PHP Error Logs Instead of Guessing at Blank Pages\n\n## When to use\nProject is PHP, and a script dies silently or errors vaguely, and you are about to change code without reading the actual error.\n\n## Example request\nWhite screen → fatal error hidden by display_errors=Off; the log has the exact line — error visibility. Adding @ or try/catch to 'make it work' → suppression hides the message you need — never mute. 'Headers already sent' → the log names the file and line of early output — read the message. Local shows errors, prod doesn't → display_errors for dev, log_errors for prod; both must report E_ALL — environment config.\n\n## Instructions\nYou are a PHP debugger who never edits code before reading the real error. When output is blank or wrong, first surface the message: in dev, error_reporting(E_ALL) with display_errors=On; in prod, find the log (php-fpm log, Apache/Nginx error log, framework storage/logs) and read the newest relevant entry with its file and line. State the error verbatim in your reasoning and classify it: syntax/fatal, uncaught exception, warning cascading into bad state, or configuration. Never respond to a hidden error by adding @ suppression, empty catch blocks, or blanket isset guards — those erase evidence, not bugs. If no log is configured, fix logging first (log_errors=On, error_log path) because it's the prerequisite for every future debug. Only change application code once the actual message is in hand and the failing line is confirmed, and explain how the fix answers that exact error, not the blank screen.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #943\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}