• Resolved metallikat36

    (@metallikat36)


    When I deactivate and reactivate the plugin, it asks me if I want to re-insert .htaccess rules. Normally, when I click yes, it works. Here is what happens now:

    1. I click Yes.
    2. I get a message saying rules have been inserted successully.
    3. I navigate to any other page on my dashboard.
    4. I notice the prompt asking me to re-insert the rules still appears again.
    5. No matter how many times I click Yes, the prompt still keeps appearing.
    6. In my file manager, I see the rules did not re-insert. So I had to manually cut and paste code from a backup of my .htaccess file. (I hope that is equivalent and I did not mess anything up).

Viewing 15 replies - 1 through 15 (of 40 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, have you updated any other plugin or theme prior to this issue? If not can you deactivate and delete the plugin then install a fresh copy of the plugin. Let me know what happens.

    Kind regards

    Thread Starter metallikat36

    (@metallikat36)

    My plugins are always periodically updating.

    I deleted and reinstalled the AIO plugin. The bug still happens.

    • This reply was modified 6 years, 5 months ago by metallikat36.
    Thread Starter metallikat36

    (@metallikat36)

    I tried deactivating all plugins, and activating only AIO. Still get the bug.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Have you tried to test one of WordPress default themes like Twenty Sixteen or Seventeen?

    Thread Starter metallikat36

    (@metallikat36)

    Just tried switching to Twenty Sixteen. Bug still happens.

    Thread Starter metallikat36

    (@metallikat36)

    Maybe it has something to do with a recent AIO plugin update?

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, check your file permissions. Make sure you can still write to your .htaccess file.

    • This reply was modified 6 years, 5 months ago by mbrsolution.
    Thread Starter metallikat36

    (@metallikat36)

    My permissions on the file are 644. So it says that User has write permission, but not group and world.

    • This reply was modified 6 years, 5 months ago by metallikat36.
    Plugin Contributor mbrsolution

    (@mbrsolution)

    Do you know if your host has made any changes to your server?

    Thread Starter metallikat36

    (@metallikat36)

    Not that I am aware of.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Is this the first time this has happened to you while using this plugin? If it is, then I suspect your issue is related to your server settings.

    The reason why I am saying this is because you have already deactivated all of your other plugins and that did not fix your issue. You also tested WordPress default themes and that did not fix your issue.

    I also carried out a test in my testing environment and carried out the same action as you did and it worked for me.

    Check your server log files. Also get in contact with your host.

    Let me know what happens.

    Kind regards

    Thread Starter metallikat36

    (@metallikat36)

    This is the first time, yes.

    The only thing I can think of on my host (Siteground) is that I recently turned on two-factor authentication. I turned it off and the bug is still there.

    I found my server log files but they are long and boring and I don’t know what I would be looking for.

    I will ask my host for help. Will let you know.

    Another symptom: I notice some settings in AIO are off that used to be on. For example, I am fairly certain I had both User Registration Honeypot and also the Basic Firewall turned on. In the backup of my .htaccess file that I made this morning (before deactivating and losing the inserted code), I don’t see anything resembling instructions for the honeypot or the firewall. Maybe I just don’t know what to look for. But the point I am making is that if it is correct behavior to not have these settings represented in the .htaccess file, then perhaps those things got turned off some other way that doesn’t have to do with the .htaccess file? Maybe this is just totally unrelated, but just clutching at straws here.

    If it helps, here is my .htaccess file before I deactivated earlier today.

    # BEGIN All In One WP Security
    #AIOWPS_BLOCK_WP_FILE_ACCESS_START
    <Files license.txt>
    <IfModule mod_authz_core.c>
    Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
    Order deny,allow
    Deny from all
    </IfModule>
    </Files>
    <Files wp-config-sample.php>
    <IfModule mod_authz_core.c>
    Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
    Order deny,allow
    Deny from all
    </IfModule>
    </Files>
    <Files readme.html>
    <IfModule mod_authz_core.c>
    Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
    Order deny,allow
    Deny from all
    </IfModule>
    </Files>
    #AIOWPS_BLOCK_WP_FILE_ACCESS_END
    #AIOWPS_BASIC_HTACCESS_RULES_START
    <Files .htaccess>
    <IfModule mod_authz_core.c>
    Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
    Order deny,allow
    Deny from all
    </IfModule>
    </Files>
    ServerSignature Off
    LimitRequestBody 10240000
    <Files wp-config.php>
    <IfModule mod_authz_core.c>
    Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
    Order deny,allow
    Deny from all
    </IfModule>
    </Files>
    #AIOWPS_BASIC_HTACCESS_RULES_END
    #AIOWPS_DEBUG_LOG_BLOCK_HTACCESS_RULES_START
    <Files debug.log>
    <IfModule mod_authz_core.c>
    Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
    Order deny,allow
    Deny from all
    </IfModule>
    </Files>
    #AIOWPS_DEBUG_LOG_BLOCK_HTACCESS_RULES_END
    #AIOWPS_PREVENT_IMAGE_HOTLINKS_START
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g?|png)$ [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(.*)?\.earthmedresearch\.org [NC]
    RewriteRule \.(gif|jpe?g?|png)$ – [F,NC,L]
    </IfModule>
    #AIOWPS_PREVENT_IMAGE_HOTLINKS_END
    # END All In One WP Security

    • This reply was modified 6 years, 5 months ago by metallikat36.
    Thread Starter metallikat36

    (@metallikat36)

    I got a reply from Siteground. They they said the following, and think it is a problem with the plugin:

    It appears to be generating the following error:

    Code:

    Warning: Cannot modify header information – headers already sent by (output started at /home/scienti7/public_html/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-general-init-tasks.php:34) in /home/scienti7/public_html/wp-includes/option.php on line 837

    Warning: Cannot modify header information – headers already sent by (output started at /home/scienti7/public_html/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-general-init-tasks.php:34) in /home/scienti7/public_html/wp-includes/option.php on line 838

    Thread Starter metallikat36

    (@metallikat36)

    Got another reply from Siteground:

    “It seems that the problem is caused by the plugin itself. The function which produces that error above is the following one:

    Code:
    if(isset($_REQUEST[‘aiowps_reapply_htaccess’])){
    if(strip_tags($_REQUEST[‘aiowps_reapply_htaccess’]) == 1){
    include_once (‘wp-security-installer.php’);
    if(AIOWPSecurity_Installer::reactivation_tasks()){
    echo ‘<div class=”updated”><p>The AIOWPS .htaccess rules were successfully re-inserted.</p></div>’;
    }else{
    echo ‘<div class=”error”><p>AIOWPS encountered an error when trying to write to your .htaccess file. Please check the logs.</p></div>’;
    }

    This means that if the script wp-security-installer.php is executed your website should paste the line

    Code:
    The AIOWPS .htaccess rules were successfully re-inserted.

    This actually happens as you can see from the screenshot below:

    https://s.nimbus.everhelper.me/share/1225504/hxv25vqf90r5fz6uyy1u

    The actual code inser in the .htaccess does not happen so it seems that this is a bug with All in One WP Security. I would recommend that you contact the developers of this plugin and wait for them to provide a fix.”

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, thank you for getting back to us with the reply from your host. I have submitted a message to the developers to investigate further this issue.

    However I have tested this under PHP 5.6x and PHP 7.x and it worked in both tests. I am not sure if this issue has anything to do with the PHP version or a configuration in the server.

    Kind regards

    • This reply was modified 6 years, 5 months ago by mbrsolution.
Viewing 15 replies - 1 through 15 (of 40 total)
  • The topic ‘Re-insert .htaccess rules does not work’ is closed to new replies.