Hi @andy_woz,
Sorry for inconvenience,
It might be in the parent folder the WordPress installed. Or, due to another reason, the firewall loader has that class included twice. though file gets added as include_once
I will create an internal ticket for this issue. As a temporary fix, you may add the below code in \wp-content\plugins\all-in-one-wp-security-and-firewall\classes\wp-security-firewall-resource-unavailable.php file
if (class_exists('AIOS_Firewall_Resource_Unavailable')) return;
https://snipboard.io/g7FYXf.jpg
I too suddenly had a fatal error on one of my sites. I had to rename the plugin folder through the hosts File manager. I was then able to login and then renamed the plugin folder back again to its original name. When I tried to activate the plugin it said “Plugin could not be activated because it triggered a fatal error.”
I added the code but was still not able to activate the plugin. I am thinking because of caching.
I have had this error as well. Thankfully it’s just on my website and not the 8 or so others I help out with.
I am using the Hestia WordPress theme and the others are running on Neve if that’s of any help.
Hi @paaljoachim @campbellduke @andy_woz
If you have error logged PHP Fatal error: Cannot declare class AIOS_Firewall_Resource_Unavailable it will solve the isssue.
wp-content\plugins\all-in-one-wp-security-and-firewall\classes\wp-security-firewall-resource-unavailable.php file
if (class_exists('AIOS_Firewall_Resource_Unavailable')) return;
https://snipboard.io/g7FYXf.jpg
If the logged error is above it had another issue for the
PHP Fatal error: Cannot declare class AIOS_Firewall_Resource, because the name is already in use in …\wp-content\plugins\all-in-one-wp-security-and-firewall\classes\wp-security-firewall-resource.php on line 9
\wp-content\plugins\all-in-one-wp-security-and-firewall\classes\wp-security-firewall-resource.php
In above file similarly needs to be added.
if (class_exists('AIOS_Firewall_Resource')) return;
We can replicate a similar issue if the site is copied from another site on the same server.
The parent folder is the main site and the child site is staging ro similar site.
It might be also somehow the as auto_prepent firewall loader getting added of another site.
Regards
I have one top directory and two sub-directory installs, all three using AIOS and both sub-directory installs were affected and giving fatal errors. I added the code to all three and deactivated/reactivated the plugin. It now seems stable.
Thanks for the fix.
Hi @andy_woz
Thanks for checking the fix.
We will implement that change and keep all you posted.
Regards
Another of my sites fell down. Giving this fatal error:
Fatal error: Cannot declare class AIOS_Firewall_Resource_Unavailable, because the name is already in use in /home/easywebd/public_html/easywebdesign.no/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-firewall-resource-unavailable.php on line 9
@hjogiupdraftplus Thank you for adding the above information. I was able to get the site backup again quickly by adding the code to both the files you mentioned.
Hi @andy_woz @paaljoachim @campbellduke
AIOS 5.3.6 released for a fix for it. let me know if still any issue.
Regards
Thank you @hjogiupdraftplus
That worked!
Hi @paaljoachim,
Glad to know the issue is fixed