zizhost
PHP

Reading PHP error logs

Where to find logs and how to interpret them.


Where logs live

The hosting panel writes PHP errors to a per-account log. Two ways to read it:

  • From the panel: Errors. The most recent entries are shown inline.
  • Via file manager: open error_log in your account’s home directory, or inside public_html/ if a request triggered it there.

Make PHP report errors to you

During development, surface everything:

<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');

In production, leave display off but keep logging on:

error_reporting(E_ALL);
ini_set('display_errors', '0');
ini_set('log_errors',     '1');
ini_set('error_log',      __DIR__ . '/../logs/php.log');

What to look for

  • Fatal: missing include, class not found, type errors. The request crashes.
  • Warning: recoverable issue. Worth investigating, and often a future fatal.
  • Notice / Deprecated: clean up over time. Deprecated calls usually break on the next PHP minor release.

If the page is blank

A blank page almost always means display_errors is off and a fatal occurred. Check the log first; turn display on temporarily if needed.