The 500 error is a generic error returned when the web-server encounters a problem and a more specific error message cannot be provided:
The first step in troubleshooting 500 errors should be to refresh the page to check if the error re-occurs - if the error is a one-off and can’t be replicated, then further investigation shouldn’t be needed.
There are many different potential causes for 500 errors and the following steps will help identify the cause of any errors occurring on your site.
Enabling Error Logging
Enabling error logging for PHP/application errors for your site may help to identify the cause of 500 errors.
The following page will provide instructions for enabling error logging to a file within the web-space for your domain: How to turn on PHP error logging
Checking File Permissions
The following page will provide instructions for checking/changing file and folder permissions for your site via FTP:How to change file permissions via FTP
- Folder permissions for directories storing web content should be set to 755.
- Files outside of the cgi-bin folder should be set to 644.
- CGI/Perl script files stored in the cgi-bin folder should be set to 755. permissions
Troubleshooting CGI/Perl script errors
If you’re encountering a 500 error with a Perl script, the following page will explain the steps to take to troubleshoot these: Troubleshooting common Perl issues
Perl/CGI scripts should be placed inside the cgi-bin folder for your site and should have permissions set to 755.
The following script interpreters should be used for Perl/CGI scripts – this may need to be checked if you’ve moved a site from a different server as these paths can vary from system to system:
Perl: /usr/bin/perl PHP/CGI: /usr/bin/php5-cgi
Troubleshooting PHP script errors
The following page will provide details on steps that you can carry out to troubleshoot common PHP script errors: Troubleshooting common PHP issues
Another common cause of 500 errors is invalid contents within the .htaccess file for a site. If the .htaccess file includes any syntax errors, or if the file attempts to enable directives that are not supported by the LCN hosting platform it may result in a 500 error.
The LCN hosting platform does not support applying the following directives in .htaccess:
AddType application/x-httpd-php ForceType application/x-httpd-php
You can test if the .htaccess file for your site is the cause of a 500 error by renaming the file and allowing 5 minutes for this to take effect. If the error is resolved after disabling/renaming the file and returns after the file is restored, then it is likely to be caused by the contents of this file.
Checking system-status for server issues
You can check our system-status for any known issues that could result in sites returning 500 errors from the following page: System Status
If we are aware of any server issues that could result in errors with sites, the status on the above page will be updated with details on the fault and an expected resolution time if this can be provided.
If the above steps don’t help in resolving any 500 errors, you can raise a support ticket for the problem from the following page: Contact us.
Please include instructions on how to replicate the error and any login details required to access the page where the error is occurring, as this should help the support team to investigate the problem.