MyBB Community Forums

Full Version: How can I find errors for plugins?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have tried a plugin. I have the error logs enabled in the settings of the forum. But still I don't get any errors or information about what's wrong.
I have seen other people get error messages from some plugins. But I have no clue how I can view this. Is there something wrong with my forum?

Use Error Handling = Set to True.
Error Logging Medium = Log Errors
Error Type Medium = Hide Errors and Warnings
Error Logging Location = ./error.log

These is the settings that I was reading about in the documentation. Still no error.log is added, or no errors at all.
Could there be issues with settings in cPanel?
1. Make sure you have an error in the first place. Create a php file and upload it to the server. Name it test.php
<?php
call_a_missing_function();
exit;

2. Browse to your forum index.php, expect everything to be normal.
Then change the url from index.php to test.php.

You may see the error on the screen in the browser. Your setting 'Hide Errors and Warnings' will prevent it showing in the browser. If it shows, it will look something like
Quote:Fatal error: Uncaught Error: Call to undefined function call_a_missing_function() in /home/somewhere/public_html/forum/test.php:2 Stack trace: #0 {main} thrown in /home/somewhere/public_html/forum/test.php on line 2

3. Go to AdminCP / Tools and Maintenance / PHPInfo and scroll down to see if the error_log directive overrides what MyBB setting says.

The error I just threw was logged there, not in ./error.log

On a previous server, the undefined function error ended up in error.log, but not on this current server. I'll look into my server's default settings to sort that out. However, it does log SQL query errors in the proper place, like you might encounter with a faulty plug-in.

Which makes me want to ask, are you experiencing faulty plugin behavior? What are the details of the error you're trying to troubleshoot?