Title: Plugin not activating correctly
Last modified: April 15, 2025

---

# Plugin not activating correctly

 *  Resolved [Castor](https://wordpress.org/support/users/castoruk/)
 * (@castoruk)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/plugin-not-activating-correctly-2/)
 * Hi
 * I’m experiencing an issue with activating the plugin.
 * When installed and activated it waits a while then throws an error. Either “There
   has been a critical error on this website”, a HTTP Error 500, 404 not found, 
   or just hangs.
 * Going back to the dashboard it does appear the plugin has installed, and can 
   follow the wizard steps. But it then does not record any activities.
 * I’ve uninstalled and reinstalled a few times without any luck.
 * Viewing the error logs I see the following:
 *     ```wp-block-code
       [15-Apr-2025 11:29:40 UTC] PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 16384 bytes) in /home/accountname/public_html/wp-content/plugins/wp-security-audit-log/classes/WPSensors/class-wp-database-sensor.php on line 587[15-Apr-2025 11:29:40 UTC] PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 458752 bytes) in /home/accountname/public_html/wp-includes/l10n/class-wp-translation-file-php.php on line 24[15-Apr-2025 11:53:32 UTC] PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 262144 bytes) in /home/accountname/public_html/wp-content/plugins/wp-security-audit-log/classes/Helpers/class-wp-helper.php on line 234[15-Apr-2025 11:53:32 UTC] PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0[15-Apr-2025 12:19:48 UTC] PHP Warning:  mysqli_real_connect(): (HY000/2002): No such file or directory in /home/accountname/public_html/wp-includes/class-wpdb.php on line 1982[15-Apr-2025 12:23:53 UTC] PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes) in /home/accountname/public_html/wp-content/plugins/wp-security-audit-log/classes/WPSensors/class-wp-database-sensor.php on line 162[15-Apr-2025 12:23:53 UTC] PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 458752 bytes) in /home/accountname/public_html/wp-includes/l10n/class-wp-translation-file-php.php on line 24[15-Apr-2025 12:24:40 UTC] WordPress database error Specified key was too long; max key length is 1000 bytes for query 				CREATE TABLE Eh6k8fD_wsal_occurrences (					id bigint NOT NULL AUTO_INCREMENT,					site_id bigint NOT NULL,					alert_id bigint NOT NULL,					created_on double NOT NULL,					client_ip varchar(255) NOT NULL,					severity varchar(255) NOT NULL,					object varchar(255) NOT NULL,					event_type varchar(255) NOT NULL,					user_agent varchar(255) NOT NULL,					user_roles varchar(255) NOT NULL,					username varchar(255) DEFAULT NULL,					user_id bigint DEFAULT NULL,					session_id varchar(255) NOT NULL,					post_status varchar(255) NOT NULL,					post_type varchar(255) NOT NULL,					post_id bigint NOT NULL,				PRIMARY KEY (id),				KEY site_alert_created (site_id,alert_id,created_on),				KEY created_on (created_on),				KEY wsal_users (user_id,username)				)			  DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WSAL\WP_Sensors\WP_Plugins_Themes_Sensor::event_admin_shutdown, WSAL\Controllers\Alert_Manager::trigger_event, WSAL\Controllers\Alert_Manager::commit_item, WSAL\Controllers\Alert_Manager::log, WSAL\Loggers\Database_Logger::log, WSAL\Entities\Occurrences_Entity::store_record, WSAL\Entities\Occurrences_Entity::save, WSAL\Entities\Abstract_Entity::save, WSAL\Entities\Occurrences_Entity::create_table, WSAL\Entities\Abstract_Entity::maybe_create_table[15-Apr-2025 12:27:54 UTC] PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes) in /home/accountname/public_html/wp-includes/class-wpdb.php on line 2316[15-Apr-2025 12:28:45 UTC] WordPress database error Specified key was too long; max key length is 1000 bytes for query 				CREATE TABLE Eh6k8fD_wsal_occurrences (					id bigint NOT NULL AUTO_INCREMENT,					site_id bigint NOT NULL,					alert_id bigint NOT NULL,					created_on double NOT NULL,					client_ip varchar(255) NOT NULL,					severity varchar(255) NOT NULL,					object varchar(255) NOT NULL,					event_type varchar(255) NOT NULL,					user_agent varchar(255) NOT NULL,					user_roles varchar(255) NOT NULL,					username varchar(255) DEFAULT NULL,					user_id bigint DEFAULT NULL,					session_id varchar(255) NOT NULL,					post_status varchar(255) NOT NULL,					post_type varchar(255) NOT NULL,					post_id bigint NOT NULL,				PRIMARY KEY (id),				KEY site_alert_created (site_id,alert_id,created_on),				KEY created_on (created_on),				KEY wsal_users (user_id,username)				)			  DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WSAL\Controllers\Alert_Manager::commit_pipeline, WSAL\Controllers\Alert_Manager::commit_item, WSAL\Controllers\Alert_Manager::log, WSAL\Loggers\Database_Logger::log, WSAL\Entities\Occurrences_Entity::store_record, WSAL\Entities\Occurrences_Entity::save, WSAL\Entities\Abstract_Entity::save, WSAL\Entities\Occurrences_Entity::create_table, WSAL\Entities\Abstract_Entity::maybe_create_table[15-Apr-2025 12:28:58 UTC] WordPress database error Specified key was too long; max key length is 1000 bytes for query 				CREATE TABLE Eh6k8fD_wsal_occurrences (					id bigint NOT NULL AUTO_INCREMENT,					site_id bigint NOT NULL,					alert_id bigint NOT NULL,					created_on double NOT NULL,					client_ip varchar(255) NOT NULL,					severity varchar(255) NOT NULL,					object varchar(255) NOT NULL,					event_type varchar(255) NOT NULL,					user_agent varchar(255) NOT NULL,					user_roles varchar(255) NOT NULL,					username varchar(255) DEFAULT NULL,					user_id bigint DEFAULT NULL,					session_id varchar(255) NOT NULL,					post_status varchar(255) NOT NULL,					post_type varchar(255) NOT NULL,					post_id bigint NOT NULL,				PRIMARY KEY (id),				KEY site_alert_created (site_id,alert_id,created_on),				KEY created_on (created_on),				KEY wsal_users (user_id,username)				)			  DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; made by require_once('wp-admin/user-edit.php'), edit_user, wp_update_user, wp_insert_user, update_user_meta, update_metadata, do_action('updated_user_meta'), WP_Hook->do_action, WP_Hook->apply_filters, WSAL\WP_Sensors\WP_Meta_Data_Sensor::event_user_meta_updated, WSAL\Controllers\Alert_Manager::trigger_event, WSAL\Controllers\Alert_Manager::commit_item, WSAL\Controllers\Alert_Manager::log, WSAL\Loggers\Database_Logger::log, WSAL\Entities\Occurrences_Entity::store_record, WSAL\Entities\Occurrences_Entity::save, WSAL\Entities\Abstract_Entity::save, WSAL\Entities\Occurrences_Entity::create_table, WSAL\Entities\Abstract_Entity::maybe_create_table[15-Apr-2025 12:28:58 UTC] WordPress database error Specified key was too long; max key length is 1000 bytes for query 				CREATE TABLE Eh6k8fD_wsal_occurrences (					id bigint NOT NULL AUTO_INCREMENT,					site_id bigint NOT NULL,					alert_id bigint NOT NULL,					created_on double NOT NULL,					client_ip varchar(255) NOT NULL,					severity varchar(255) NOT NULL,					object varchar(255) NOT NULL,					event_type varchar(255) NOT NULL,					user_agent varchar(255) NOT NULL,					user_roles varchar(255) NOT NULL,					username varchar(255) DEFAULT NULL,					user_id bigint DEFAULT NULL,					session_id varchar(255) NOT NULL,					post_status varchar(255) NOT NULL,					post_type varchar(255) NOT NULL,					post_id bigint NOT NULL,				PRIMARY KEY (id),				KEY site_alert_created (site_id,alert_id,created_on),				KEY created_on (created_on),				KEY wsal_users (user_id,username)				)			  DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; made by require_once('wp-admin/user-edit.php'), edit_user, wp_update_user, wp_insert_user, update_user_meta, update_metadata, do_action('updated_user_meta'), WP_Hook->do_action, WP_Hook->apply_filters, WSAL\WP_Sensors\WP_Meta_Data_Sensor::event_user_meta_updated, WSAL\Controllers\Alert_Manager::trigger_event, WSAL\Controllers\Alert_Manager::commit_item, WSAL\Controllers\Alert_Manager::log, WSAL\Loggers\Database_Logger::log, WSAL\Entities\Occurrences_Entity::store_record, WSAL\Entities\Occurrences_Entity::save, WSAL\Entities\Abstract_Entity::save, WSAL\Entities\Occurrences_Entity::create_table, WSAL\Entities\Abstract_Entity::maybe_create_table
       ```
   
 * Checking the database it does not appear there are any wsal_ based tables in 
   there.
   The MySQL account does have full privileges. Any ideas?WP 6.7.2PHP 8.2.28MySQL
   8.0.42

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Support [Lucian Padureanu](https://wordpress.org/support/users/lucianwpwhite/)
 * (@lucianwpwhite)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/plugin-not-activating-correctly-2/#post-18419317)
 * Hello [@castoruk](https://wordpress.org/support/users/castoruk/) 
   Thanks for 
   bringing this into our attention and also for reaching out and for sharing the
   full error log—this has been super helpful.Based on what we’re seeing, your issue
   matches one similar case reported to us recently, where the following database
   error occurs during table creation:
 * **Specified key was too long; max key length is 1000 bytes**
 * This seems to happen on certain Apache-based cPanel hosting environments, particularly
   where the default database storage engine is set to **MyISAM** instead of **InnoDB**.
   Having only 1000 bytes allocated for saving a new table is something we clearly
   do not see very often, so it seems that this is specific to some server conifigurations.
 * As a workaround, another user resolved this by asking their hosting provider 
   to change the default storage engine to **InnoDB**, which resolved the table 
   creation issue for them. You might want to check with your hosting support to
   see if this is applicable in your case as well. _(of course, if you know for 
   sure that you are at least using Apache on the server the site’s hosted)_
 * In the meantime, we’ve opened an internal ticket and are actively looking into
   this for a more robust solution from our end. It would be really useful to hear
   back from you on how my potential workaround went, and if that’s something you
   can consider.
 * Thanks again for your cooperation and patience while we investigate this!
 *  Thread Starter [Castor](https://wordpress.org/support/users/castoruk/)
 * (@castoruk)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/plugin-not-activating-correctly-2/#post-18419366)
 * Thanks [@lucianwpwhite](https://wordpress.org/support/users/lucianwpwhite/) 
   
   I’d done some more digging and came to a similar conclusion.
 * The server is definitely Apache.
 * I’ll ask about changing the default storage engine to InnoDB. Could that change
   not affect the existing site DB, or would it only be for anything created going
   forward?
 *  Plugin Support [Lucian Padureanu](https://wordpress.org/support/users/lucianwpwhite/)
 * (@lucianwpwhite)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/plugin-not-activating-correctly-2/#post-18419481)
 * Hello again [@castoruk](https://wordpress.org/support/users/castoruk/) !
   Thank
   you for the follow up on this.
 * It would be very difficult to answer that, since that may vary from site to site,
   configuration to configuration however, in most cases, changing the **default
   storage engine to InnoDB** will **only apply to new tables that are created from
   that point onward**. It should not retroactively convert or impact any of your
   existing tables or data.
 * That said, it’s always good practice to back up your database before making any
   changes at the server level — just in case.
 * In the meantime, we have also prepared a patch, which we are confident can solve
   this edge case, without you require to alter the database in any way, Since we
   could not entirely replicate an exact setup as the one described, we rely on 
   your feedback on how this goes, which will surely help a lot! 
   **To install: **
   1. Remove the current installation. (before removing the plugin make sure you
   activate the option to “delete files and data when uninstalling” found on Settings-
   > Advanced Settings page, so that we an ensure a clean install of the patch.2.
   Grab [the latest patch from here](https://melapress.com/support/plugins-patches/downloads/)(
   look for the one from today 20250416 (MySQL fix)3. Install it as a new plugin
   from Plugins page (upload plugin)Looking forward to your update on how things
   are going!
 *  Thread Starter [Castor](https://wordpress.org/support/users/castoruk/)
 * (@castoruk)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/plugin-not-activating-correctly-2/#post-18420540)
 * Thanks [@lucianwpwhite](https://wordpress.org/support/users/lucianwpwhite/) 
   
   The host changed to InnoDB surprisingly quickly.
 * Tried reinstalling the plugin from the dashboard in the usual way and it installed
   without a problem.
 * Thanks for the support.
 *  Plugin Support [Lucian Padureanu](https://wordpress.org/support/users/lucianwpwhite/)
 * (@lucianwpwhite)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/plugin-not-activating-correctly-2/#post-18421175)
 * Thanks for confirming this for me , [@castoruk](https://wordpress.org/support/users/castoruk/)!
   Glad things are now working as expected. 
   Please do not forget to spare one minute
   to [drop us a review](https://wordpress.org/support/plugin/wp-security-audit-log/reviews/#new-post)
   here on WordPress plugin page These reviews take only one minute to post but 
   really help out! Many thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Plugin not activating correctly’ is closed to new replies.

 * ![](https://ps.w.org/wp-security-audit-log/assets/icon-256x256.png?rev=2961534)
 * [WP Activity Log](https://wordpress.org/plugins/wp-security-audit-log/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-security-audit-log/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-security-audit-log/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-security-audit-log/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-security-audit-log/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-security-audit-log/reviews/)

## Tags

 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)

 * 8 replies
 * 2 participants
 * Last reply from: [Lucian Padureanu](https://wordpress.org/support/users/lucianwpwhite/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/plugin-not-activating-correctly-2/#post-18421175)
 * Status: resolved