BPS Speed Boost Cache Custom Code Notice

Home Forums BulletProof Security Pro BPS Speed Boost Cache Custom Code Notice

This topic contains 21 replies, has 4 voices, and was last updated by  AITpro Admin 10 months, 3 weeks ago.

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #33426

    AITpro Admin
    Keymaster

    The BPS Speed Boost Cache Custom Code Notice checks this BPS Root Custom Code text box: 1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE for these Markers: WEBSITE SPEED BOOST, WPSuperCache, W3TC Browser Cache, Comet Cache, GzipWpFastestCache or LBCWpFastestCache and WP Rocket. If the BPS WEBSITE SPEED BOOST Marker and other caching plugin’s Markers are found in the 1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE text box then you will see the BPS Speed Boost Cache Custom Code Notice message displayed to you with a link to this forum topic.

    If you are already have a caching plugin installed (WPSC, W3TC, WPFC (free & Premium), Comet Cache (free & Pro), WP Rocket, etc) and have already added your caching plugin’s Browser caching code in BPS Custom Code then you do not need to also add the BPS Speed Boost Browser caching code. Adding duplicate or redundant Browser caching code will not improve website performance and may actually cause your website to perform/load slower.  Or you can choose to use the BPS Speed Boost Cache code instead of the Browser caching code from other plugins.  Important Note: This only applies to browser caching code specifically and does not apply to all htaccess caching code created by other plugins.  For example W3TC creates Browser caching code, page caching code and other htaccess caching code.  Other caching plugins also similarly create different types/sections of htaccess caching code.  All caching plugins do not create the exact same htaccess caching code so if you are not sure if another plugin’s caching code is Browser caching code then post a forum Reply with your caching plugins htaccess custom code so we can let you know which code is Browser caching htaccess code or other caching code.

    Some caching plugins have specific Markers for Gzip or Browser caching code or automatically include Browser caching code by default (W3TC, WPFC and WP Rocket) and other caching plugins just have general BEGIN and END Markers for all caching code (WPSC and Comet Cache). You should remove/delete the BPS Speed Boost Cache custom code from BPS Root Custom Code if you have these caching plugins installed and are using these option settings: W3TC and are using the W3TC Browser caching option setting, WPFC and are using the Gzip or Browser caching option setting and WP Rocket (any option setting since this plugin creates Browser caching code by default). See the steps below to remove/delete the BPS Speed Boost Cache custom code from BPS Root Custom Code.

    If you have the WPSC or Comet Cache plugins installed then you may or may need to remove the BPS Speed Boost Cache custom code from the BPS Root Custom Code text box. Copy all of your htaccess custom code from this BPS Root Custom Code text box: 1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE and post a forum Reply with your htaccess custom code so we can let you know whether or not you should remove/delete the BPS Speed Boost Cache custom code.

    If you would like to prevent the BPS Speed Boost Cache Custom Code Notice check from checking BPS Custom Code then add/create this Marker: # BPS NOCHECK anywhere in this BPS Root Custom Code text box: 1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE. See the steps below to add/create the BPS NOCHECK Marker in BPS Root Custom Code.  For example if you have the WP Super Cache plugin installed, but are only using the WPSC Marker text: WPSuperCache in the BPS Custom Code text box (to prevent other BPS error messages from being displayed) and do not actually have any WPSC htaccess code saved in the BPS Custom Code text box and you have added the BPS Speed Boost Cache code in the BPS Custom Code text box then you would add the BPS NOCHECK Marker text in the CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE text box to prevent the BPS Speed Boost Cache Custom Code Notice check from checking BPS Custom Code.

    Remove/delete the BPS Speed Boost Cache custom code from BPS Root Custom Code:
    1. Go to the BPS Custom Code page.
    2. Click the Root htaccess File Custom Code accordion button.
    3. Remove/delete the BPS Speed Boost Cache code from this Custom Code text box: 1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE
    4. Click the Save Root Custom Code button.
    5. Go the Security Modes page and click the Root Folder BulletProof Mode Activate button.

    Add/create the BPS NOCHECK Marker in BPS Root Custom Code:
    1. Go to the BPS Custom Code page.
    2. Click the Root htaccess File Custom Code accordion button.
    3. Add/create this Marker (including the #sign): # BPS NOCHECK in this Custom Code text box: 1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE
    4. Click the Save Root Custom Code button.
    5. Go the Security Modes page and click the Root Folder BulletProof Mode Activate button.

    Note: BPS Pro 13+ and BPS free 2.0+ plugin versions have a new feature called Setup Wizard AutoFix (AutoWhitelist|AutoSetup|AutoCleanup), which will automatically setup/save/combine other caching plugins htaccess code with BPS htaccess code in BPS Root Custom Code when the Pre-Installation and Setup Wizard are run. The htaccess code for other caching plugins is not changed in any way and is not literally combined with BPS htaccess code and is instead saved to the BPS Root Custom Code text box in separate individual blocks of htaccess code. The meaning of “combined” means combined together in the BPS Custom Code text box in separate individual blocks of htaccess code.

    #33443

    ibiza
    Participant

    Hi, thanks for the feedback, but I´ve a problem when imputing the code at our website:

    3. Add/create this Marker (including the #sign): # BPS NOCHECK in this Custom Code text box: 1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE

    When I save it redirects to a page that says:
    ===================================
    403 Forbidden Error Page
    If you arrived here due to a search or clicking on a link click your Browser’s back button to return to the previous page. Thank you.
    IP Address: –.—.—.—.— (I´ve deleted the IP)
    ===================================

    I´ve tryed several times and got same error…
    I have “Comet Cache” plugin, plus “Wordfence” plugin if this info helps.
    Is there any other way to takeoff the message at our admin panel that says:

    BPS Speed Boost Cache Custom Code Notice
    BPS Speed Boost Cache Code was found in this BPS Custom Code text box: CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE
    and another caching plugin’s Marker text was also found in this BPS Custom Code text box.
    Click this link: BPS Speed Boost Cache Custom Code Notice Forum Topic for help information on what this Notice means and what to do next.

    Thanks in advance!

    #33444

    AITpro Admin
    Keymaster

    [deleted invalid possible solution]

    Most likely something like Mod Security is causing the 403 error problem when trying to save Custom Code.

    #33445

    AITpro Admin
    Keymaster

    Actually that would not work since the NOCHECK Marker is only checked in the Custom Code text box and not the Root htaccess file.  Try deactivating all of your other plugins and see if you can save Custom Code without seeing a 403 error.  If that does not work then temporarily disable Mod Security in your web host control panel.

    #33446

    ibiza
    Participant

    Hi, we have used our personalized codes at BPS (custom codes) since long time ago with no problem, we have typed them and saved with out any error, the error comes with this last code.

    We have donde what you said at your 1st answer and saved well, but doesn´t solved the message on top of the admin panel about cache plugins, stills there.

    Either we cannot disable all plugins as plugins are our principal configuation in our websites and if we disable them, we loose all their config, personalization and so lot, that takes hours and hours to try to get everything back as it was, so we cannot do this.

    Is there any way for solving this situation after todays BPS update?

    Thanks!

    #33447

    AITpro Admin
    Keymaster

    Or of course you can just dismiss the Dismiss Notice for now just to get rid of the Notice and then try to figure out what is breaking BPS Custom Code at a later time. 😉  Whatever is now breaking BPS Custom Code is probably something that has either changed on your host server or maybe one of your other plugins is breaking BPS Custom Code, but for now you can just dismiss the Dismiss Notice and try to figure out what is now breaking BPS Custom Code.

    #33452

    ibiza
    Participant

    Hi, thanks for the answer 😉 But there isn´t any way to dismiss notice, as in other codes. There isn´t that option in the text, so we can´t get rid of it. Any solution 🙂 Thanks!

    http://prntscr.com/fp2ha5

    #33453

    ibiza
    Participant

    Hi again, one more thing… We spoke with our server admins and said: ” there was a rule triggered in the firewall, which I have whitelisted.” So we could imput the code without the 403 error, BUT after saving and going thru steps 4 and 5:

    4. Click the Save Root Custom Code button.
    5. Go the Security Modes page and click the Root Folder BulletProof Mode Activate button.

    The message keeps on top of our admin panel: http://prntscr.com/fp2ha5

    Is there a way for fixing this?

    Thanks in advance!

    #33454

    AITpro Admin
    Keymaster

    Oops yep that Notice is not dismissable.  Interesting problem.  Ideally you would want to figure out what is breaking BPS Custom Code, but maybe doing these steps would work?  If the problem is being caused by something like if Mod Security is enabled in your web host control panel then these steps probably would not work.

    1. Export your Custom Code by clicking the Custom Code Export button.
    2. Delete all of your Custom Code by clicking the Custom Code Delete button.
    3. Try adding the # BPS NOCHECK Marker text in this Custom Code text box: 1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE.

    If that works then you will need to re-add all of the Custom Code that you exported back into the Custom Code text boxes.

    #33455

    AITpro Admin
    Keymaster

    Just click anywhere or refresh your Browser and the Notice message should go away.  Yep, most likely your web host is using Mod Security, which is known to break BPS Custom Code.

    #33456

    FireMyst
    Participant

    When I update the “custom code” section to remove the BPS speed boost code (because I have another caching plugin installed), BPS cannot save. Returns with:
    403 Forbidden Error Page
    If you arrived here due to a search or clicking on a link click your Browser’s back button to return to the previous page. Thank you.

    The URL that’s displayed in the browser’s address bar is:
    [domain removed]/wp-admin/admin.php?page=bulletproof-security/admin/core/core.php#bps-tabs-7

    The logging info from BPS is as follows:

    [403 POST Request: June 28, 2017 8:20 am]
    BPS: 2.1
    WP: 4.8
    Event Code: WPADMIN-SBR
    Solution: https://forum.ait-pro.com/forums/topic/security-log-event-codes/
    REMOTE_ADDR: 13.54.173.90
    Host Name: ec2-13-54-173-90.ap-southeast-2.compute.amazonaws.com
    SERVER_PROTOCOL: HTTP/1.1
    HTTP_CLIENT_IP:
    HTTP_FORWARDED:
    HTTP_X_FORWARDED_FOR:
    HTTP_X_CLUSTER_CLIENT_IP:
    REQUEST_METHOD: GET
    HTTP_REFERER: http://[domain removed]/wp-admin/admin.php?page=bulletproof-security%2Fadmin%2Fcore%2Fcore.php
    REQUEST_URI: /wp-admin/admin.php?page=bulletproof-security/admin/core/core.php
    QUERY_STRING: page=bulletproof-security/admin/core/core.php
    HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0
    REQUEST BODY: BPS Security Log option set to: Do Not Log POST Request Body Data
    

    What needs to be done to fix this so I can update and save the custom code?

    Thank you!

    #33457

    AITpro Admin
    Keymaster

    @ FireMyst – Most likely Mod Security is breaking BPS Custom Code.  That is a very common problem.  Log into your web host control panel and disable Mod Security or contact your host support folks to do that for you.

    #33458

    ibiza
    Participant

    Hi, I´m really sorry but this is not working:

    I exported the custom code, typed the code: # BPS NOCHECK, it worked well as before, when our server admins triggered the problem at firewall, so we imported our custom code back, BUT it didn´t import anything, the code is there in the exported txt file, but doesn´t import it and now we just don´t know how to proceed for reinstalling all this personalized custom code back to where it was.

    Second thing, the top message at our website is still there, doesn´t dissapear, we cannot get rid of it at all, there is no dismiss notice or anything and it doesn´t leave.

    Could you please give us a solution, this is turning us a bit crazy….

    And about mod_security we need to have it on, as some of our config works with it.

    Thanks again!

    #33459

    ibiza
    Participant

    Ok, we have fixed, unistalling and reinstalling BPS plugin, recreating everything back as it was (personalized code included), so our problem it´s fixed! Thanks for your time!

    #33460

    AITpro Admin
    Keymaster

    @ ibiza – Great!  Yeah some web hosts allow you to actually change/whitelist the individual Mod Security SecRules/SecFilter rules, but a lot of web hosts only offer either to Enable or Disable Mod Security. 😉

Viewing 15 posts - 1 through 15 (of 22 total)

You must be logged in to reply to this topic.