PHP - Troubleshooting Checklist
Diagnosing PHP errors can sometimes be challenging. The following checklist can help you identify and resolve issues:
- Error Logs: Check the PHP or web server error logs. These logs often provide detailed information about the error and its cause.
- Error Messages: Read any error messages displayed in the browser carefully. They can offer useful clues about what went wrong and where.
- PHP File Permissions: Ensure that the PHP files have the correct file permissions and can be read and executed by the server.
- Memory Limits: Verify that the PHP memory (
memory_limit
) is sufficient and that the script has not exceeded it. - Code Review: Review your PHP code for syntax or logic errors. Make sure the code is correctly written and all necessary files or functions are properly included.
Internal Server Error
If you encounter an internal server error or your PHP script fails to execute, review the following checklist:
Common Causes
- File Transfer: Ensure that your PHP script is transferred to the server in ASCII format.
- File Permissions: Make sure the PHP script has the correct file permissions (CHMOD 755).
- Directory Permissions: Verify that the directory containing the PHP script has the correct permissions (CHMOD 755 or lower). The directory should not have write permissions for the group or others.
Additional Tips for WordPress
- If you're using WordPress, try disabling the web firewall temporarily to see if it resolves the issue.
- If you're experiencing issues with a WordPress plugin or theme, try disabling it or updating to the latest version.
PHP Fatal Error: Allowed Memory Size Exceeded
Fatal error: Allowed memory size of n bytes exhausted (tried to allocate m bytes)
If you encounter a fatal error indicating that the allowed memory size has been exceeded:
- Log in to your Oma Avaruus control panel at https://oma.avaruus.net.
- Select Settings -> Sites from the main menu.
- Choose the website you want to modify and click Edit.
- In the window that opens, select PHP settings and activate your own PHP settings.
- Increase the
memory_limit
value to a higher setting.
Updated on: 30/07/2025
Thank you!