Blank Page or 500 Error After Install

A completely blank page means PHP hit a fatal error and error display is switched off. The error itself is recorded — you just need to find it.

1. Read the log first

Look in application/logs/ for the most recent file. The fatal error is almost always recorded there with a file and line number, which usually identifies the cause immediately.

2. Turn on error display temporarily

Set the environment to development in index.php:

define('ENVIRONMENT', 'development');

Reload the page to see the actual error. Set it back to production as soon as you have finished. Leaving development mode on a public site exposes file paths and configuration details to anyone who can trigger an error.

3. Check file permissions

find /path/to/whmaz -type d -exec chmod 755 {} +
find /path/to/whmaz -type f -exec chmod 644 {} +

Confirm the web server user owns the files and can write to application/logs/ and the cache directories.

4. Raise the memory limit

A blank page on larger pages such as reports often just means PHP ran out of memory. Set memory_limit = 256M in php.ini and restart the web server.

5. Check for a missing extension

php -m | grep -E 'curl|mbstring|openssl|pdo_mysql|zip|gd'

Anything missing from that list can cause a fatal error on the pages that need it.

6. Check the web server error log

If PHP is not logging anything at all, look at the Apache or Nginx error log — the failure may be occurring before PHP is even reached.

Was this article helpful?