admin管理员组

文章数量:1122832

I am developing a plugin. I am getting an error when activating, but I can't find out what is causing the error, even which file is causing the error.

I don't receive an email for the fatal error, and nothing is added to the error_log file.

How can I find out what is causing the error?

Update:

Here's the code I'm using in the main plugin php file for error reporting:

//Turn on error reporting
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
ini_set('log_errors', TRUE);
ini_set('error_log', '/my path/wp-content/plugins/pbcsc_cat_by_sub_cat/errors.log');
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
error_reporting(E_ALL);
error_log('ajet.php starting');
//Set mysqli to report errors
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);

The error message I get when trying to activate the plugin is:

Plugin could not be activated because it triggered a fatal error.

本文标签: phpError message not appearing in error email or in the error log