My site shows a 500 error: how do I see the PHP error?
If your site shows "HTTP ERROR 500" or a blank white page, the cause is usually a PHP error in your application's code. For security reasons, PHP errors are not displayed on screen on our servers and are not written to the error log in the control panel. To see the error message, you can temporarily enable one of the methods below in your own file.
Method 1: Show the error on screen
Add these three lines at the very top of your entry file (usually index.php), right after the first <?php line:
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);Reload the page. The error message appears on screen together with the file name and line number.
Method 2: Write the error to a file
If you do not want visitors to see the error, write it to a log file instead:
ini_set('log_errors', '1');
ini_set('error_log', '/home/yourdomain.com/php_error.log');
error_reporting(E_ALL);Replace yourdomain.com with your own domain name. The log file is created in your home folder, which cannot be reached from the internet. Open it with the File Manager in the control panel and look at the last lines.
When you are done
Remove the lines you added and delete the log file. Error messages can reveal your folder structure, so the setting should not stay on.
Most common causes of a 500 error
- File paths that break after the entry file is moved to another folder (require, include).
- A wrong database name, user name or password in the configuration file.
- Database tables that have not been imported yet.
- A missing PHP extension or an incompatible PHP version (control panel, Config, Change PHP).
- File and folder permissions (folders should be 755, files 644).
When you open a support ticket
Our hosting support covers the server, PHP, domain, SSL and e-mail. Fixing errors inside your application code is outside the scope of support. If the error message points to something on the server side (for example a missing extension), copy the message and add it to your ticket. Remove passwords and similar details from the message.
Thanks for your feedback!