PHP Fatal error: Cannot redeclare bpspro_ap_check

Home Forums BulletProof Security Pro PHP Fatal error: Cannot redeclare bpspro_ap_check

Viewing 15 posts - 1 through 15 (of 69 total)
  • Author
    Posts
  • #13967
    Rich
    Participant

    I’m getting this error log:

    [20-Mar-2014 14:49:35 UTC] PHP Fatal error: Cannot redeclare bpspro_ap_check() in /mnt/xxxx/xxxx/xxxx/web/content/wp-content/plugins/bulletproof-security/includes/functions.php on line 54
    [20-Mar-2014 14:49:35 UTC] PHP Fatal error: Cannot redeclare bpsPro_AP_Check() (previously declared in /mnt/xxxx/xxxx/xxxx/web/content/wp-content/plugins/bulletproof-security/includes/functions.php:54) in /mnt/xxxx/xxxx/xxxx/web/content/wp-content/plugins/bulletproof-security/includes/functions.php on line 67

    Any idea what I should be looking for that might be causing this?
    It keeps repeating itself.

    #13969
    AITpro Admin
    Keymaster

    The cause and solution for this problem is here: https://forum.ait-pro.com/forums/topic/php-fatal-error-cannot-redeclare-bpspro_ap_check/page/4/#post-25456

    That is very odd and something I have never seen before.  The function is valid:  bpsPro_AP_Check() on line 54 in the functions.php file, but is not duplicated on line 67 so I am not sure what could be causing that.  Try something simple first.  Use the BPS Pro built-in Upload Zip installer (NOT the WordPress Upload zip installer) to reinstall the BPS Pro zip file.  You will not lose any settings – this is just reinstalling the BPS Pro files.

    Upgrading|Reinstalling an existing BulletProof Security Pro Installation (Using the BPS Pro Built-in Upload Zip Installer)
    http://forum.ait-pro.com/forums/topic/bulletproof-security-pro-bps-pro-upgrade-installation-methods/

    #14006
    Rich
    Participant

    I followed your instructions and double-checked – there is only one functions.php.  After I deleted the errors log and reset the time I am still gettting this:

    20-Mar-2014 18:07:50 UTC] PHP Fatal error: Cannot redeclare bpspro_ap_check() in /mnt/stor2-wc2-dfw1/435600/www.afcea-qp.org/web/content/wp-content/plugins/bulletproof-security/includes/functions.php on line 54
    [20-Mar-2014 18:07:50 UTC] PHP Fatal error: Cannot redeclare bpspro_ap_check() in /mnt/stor2-wc2-dfw1/435600/www.afcea-qp.org/web/content/wp-content/plugins/bulletproof-security/includes/functions.php on line 54
    [20-Mar-2014 18:08:04 UTC] PHP Fatal error: Cannot redeclare bpspro_ap_check() in /mnt/stor2-wc2-dfw1/435600/www.afcea-qp.org/web/content/wp-content/plugins/bulletproof-security/includes/functions.php on line 54
    [20-Mar-2014 18:08:04 UTC] PHP Fatal error: Cannot redeclare bpspro_ap_check() in /mnt/stor2-wc2-dfw1/435600/www.afcea-qp.org/web/content/wp-content/plugins/bulletproof-security/includes/functions.php on line 54

    BTW, I’m using Cloud Flare.  Could that be the culprit?  I’ve set up page rules to bypass the wp-admin directory in Cloud Flare.

    #14008
    Rich
    Participant

    I just deleted the plugins .htaccess and the errors seem to have stopped.  Does that narrow things down at all?

    #14009
    AITpro Admin
    Keymaster

    The cause and solution for this problem is here: https://forum.ait-pro.com/forums/topic/php-fatal-error-cannot-redeclare-bpspro_ap_check/page/4/#post-25456

    Yes, it is possible that this is another new Cloudflare problem.  It is similar to the previous issues/problems we were seeing with Cloudflare.

    Did you make sure that Cloudflare is not accessing or caching anything in your wp-admin area – on the Cloudflare site in Cloudflare options settings and not on your website?  Why Cloudflare would even have such an option at all is very strange to me since the only thing that Cloudflare should be handling should be frontend website stuff and not doing anything at all in your wp-admin backend area, but maybe there is a reason for having that option in some cases.

    The previous problems that were occuring with Cloudflare is that Cloudflare was injecting its code into BPS Pro plugin pages, which broke functionality on several BPS Pro plugin pages.  That issue was resolved by blocking Cloudflare from injecting its code into BPS Pro plugin pages.

    I would like to log into this site to see what is going on.  This may or may not have anything at all to do with Cloudflare and could something else entirely.  Create a temporary WordPress Admin login account and send the login information directly to Ed – edward at ait-pro.com

    #14010
    AITpro Admin
    Keymaster

    The cause and solution for this problem is here: https://forum.ait-pro.com/forums/topic/php-fatal-error-cannot-redeclare-bpspro_ap_check/page/4/#post-25456

    I just saw your other post.  It could be that the Plugin Firewall .htaccess file has something that is not valid in that file so yes that could be the problem.  Do the Plugin Firewall setup steps again and see if the problem returns or if things are ok now.

    #14014
    AITpro Admin
    Keymaster

    The cause and solution for this problem is here: https://forum.ait-pro.com/forums/topic/php-fatal-error-cannot-redeclare-bpspro_ap_check/page/4/#post-25456

    Ok I have isolated the problem.  It does NOT have anything to do with Cloudflare.  The problem is occurring with the WP Hide Dashboard plugin.  When I deactivate this plugin the Plugin Firewall starts working again and BPS Pro plugin pages are no longer broken.  I will download this plugin and do additional testing to find out what is causing the problem.  Most likely we can create some code to block this plugin from breaking stuff, but it is very possible that what this plugin is trying to do and what the BPS Pro Plugin Firewall do are in direct conflict since the general principal is in the same ballpark.  I will be logging out of your site in about 3 minutes.  I want to look at a couple of other things.

    WP Hide Dashboard

    A simple plugin that removes the Dashboard menu, the Personal Options section and the Help link on the Profile page, hides the Dashboard links in the toolbar menu (if activated), and prevents Dashboard access to users assigned to the Subscriber role. Useful if you allow your subscribers to edit their own profiles, but don’t want them wandering around your WordPress admin section. Note: This version requires a minimum of WordPress 3.4. If you are running a version less than that, please upgrade your WordPress install now.

    Version 2.2 | By Kim Parsell

    #14015
    AITpro Admin
    Keymaster

    The cause and solution for this problem is here: https://forum.ait-pro.com/forums/topic/php-fatal-error-cannot-redeclare-bpspro_ap_check/page/4/#post-25456

    Nope the problem came back again.  The next most likely plugin to look at is the WordPress HTTPS plugin.  I see a lot of things about this plugin just by looking at what it is doing that I would definitely NOT use it on any of my websites.  You can do the exact same thing with .htaccess code in a way that will not break things:  http://forum.ait-pro.com/forums/topic/wordpress-ssl-htaccess-code-rewrite-ssl-rewritecond-server_port/#post-7233
    Note: I cannot add this code because if I do that then your site will become inaccessible until you change your WordPress General settings to match the HTTPS prefix.

    WordPress HTTPS
    WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
    Version 3.3.6 | By Mike Ems | Visit plugin site | Settings | FAQ | Support | Donate

    #14016
    AITpro Admin
    Keymaster

    The cause and solution for this problem is here: https://forum.ait-pro.com/forums/topic/php-fatal-error-cannot-redeclare-bpspro_ap_check/page/4/#post-25456

    Ok at this point the Dashboard went white/blank on me after deleting the root and wp-admin .htaccess files so i cannot continue to look at things. FTP to your website and manually upload root and wp-admin .htaccess files.

    My hunch is that the problem is a combination of Cloudflare and the way the HTTPS plugin does what it is doing.  At this point leave the Plugin Firewall turned off until you have time to do a process of elimination thing here and look at the SSL to Cloudflare issue since I think that is the root of the problem.

    This Cloudflare code is loading in BPS Pro plugin pages, but I am pretty sure it is not causing the problem.

    <script type="text/javascript">
    //<![CDATA[
    try{if (!window.CloudFlare) {var CloudFlare=[{verbose:0,p:0,byc:0,owlid:"cf",bag2:1,mirage2:0,oracle:0,paths:{cloudflare:"/cdn-cgi/nexp/dok8v=02fcfa4f56/"},atok:"f0668340968e575e4bc90ab4c79a3705",petok:"08e2bb51cb77cfc933f9e105128bee5f4003b8d0-1395343646-1800",zone:"afcea-qp.org",rocket:"0",apps:{"ga_key":{"ua":"UA-2082143-11","ga_bs":"2"}}}];var a=document.createElement("script"),b=document.getElementsByTagName("script")[0];a.async=!0;a.src="//ajax.cloudflare.com/cdn-cgi/nexp/dok8v=b064e16429/cloudflare.min.js";b.parentNode.insertBefore(a,b);}}catch(e){};
    //]]>
    </script>

    Cloudflare is not happy and is generating this error message about SSL on this site – i have no idea what to tell you about that except that probably the way you are doing SSL is not a good thing or something is not configured correctly somewhere.

    Unable to get domain via CloudFlare API - cURL returned an SSL related error when contacting the CloudFlare API using HTTPS.
     It is possible that your server's CA cert bundle is out of date. You should contact your server administrator or hosting 
    provider and ask them to check that you have the latest CA Cert bundle installed. cURL Error: 60 - SSL certificate problem, 
    verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
    #21689
    Sweetspot
    Participant

    [Topic has been merged into this relevant Topic]

    Hi, I have some errors in my security log that I don´t know how to handle. It looks like this:
    I could need som help sorting this out. Please?

    [BPS Pro htaccess Protected Secure PHP Error Log]
    
    [28-Mar-2015 10:36:29 UTC] PHP Fatal error: Cannot redeclare bpsPro_AP_Check() (previously declared in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php:54) in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php on line 67
    [28-Mar-2015 10:37:14 UTC] PHP Fatal error: Cannot redeclare bpsPro_AP_Check() (previously declared in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php:54) in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php on line 67
    [28-Mar-2015 10:37:32 UTC] PHP Fatal error: Cannot redeclare bpsPro_AP_Check() (previously declared in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php:54) in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php on line 67
    [28-Mar-2015 10:37:54 UTC] PHP Fatal error: Cannot redeclare bpsPro_AP_Check() (previously declared in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php:54) in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php on line 67
    [28-Mar-2015 10:38:09 UTC] PHP Fatal error: Cannot redeclare bpsPro_AP_Check() (previously declared in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php:54) in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php on line 67
    [28-Mar-2015 10:38:22 UTC] PHP Fatal error: Cannot redeclare bpsPro_AP_Check() (previously declared in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php:54) in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php on line 67
    [28-Mar-2015 10:38:33 UTC] PHP Fatal error: Cannot redeclare bpsPro_AP_Check() (previously declared in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php:54) in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php on line 67
    [28-Mar-2015 10:38:45 UTC] PHP Fatal error: Cannot redeclare bpsPro_AP_Check() (previously declared in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php:54) in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php on line 67
    [28-Mar-2015 10:38:53 UTC] PHP Fatal error: Cannot redeclare bpsPro_AP_Check() (previously declared in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php:54) in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bulletproof-security/includes/functions.php on line 67
    #21692
    AITpro Admin
    Keymaster

    The cause and solution for this problem is here: https://forum.ait-pro.com/forums/topic/php-fatal-error-cannot-redeclare-bpspro_ap_check/page/4/#post-25456

    Sorry for the late response.  Having some technical issues with our ISP.

    In general a “Cannot redeclare” php error means that a function with the same exact name exists/is a duplicate function name or is being “included” or “required” more than once, but in this case the function name is unique so I doubt that is actually the real problem. Use FTP or your web host control panel file manager and delete any/all /plugins/bulletproof-security/ folders that you see and then reinstall BPS Pro using the WordPress Upload Zip installer.  This will install new BPS Pro files and will not remove your BPS Pro settings.  If you are still seeing the same php error after reinstalling BPS Pro then send an email to info at ait-pro dot com so I can login to the site and figure out what is causing the error/problem.

    #21694
    Sweetspot
    Participant

    Ok. I will do so. I´ll get back to you. /C

    #21695
    Sweetspot
    Participant

    You got mail! Thanks for answering!

    /C

    #21696
    AITpro Admin
    Keymaster

    Yep got it.  Brutal not having Internet access.  Will login shortly and let you know what I figure out.

    #21697
    AITpro Admin
    Keymaster

    Ok I see what the problem is.  The cause of the php error has to do with the BPS Pro Plugin Firewall and the website/server IP address is an internal 10.xxx.xxx.xxx which would either mean that is site is inside of an internal network or there is a routing problem with with your Proxy server.  When I use the BPS Pro Pro-Tools DNS Finder tool I get a public ip addresss for your website and server of 188.95.227.20  so that would pretty conlusively mean that the problem is a Proxy routing problem. That is something that your host needs to fix.

    So what is happenning is that since the Proxy has a routing problem then files are being “served twice” and the function is being seen as loaded twice.  I tried manually creating a workaround until the routing problem is fixed by your host, but it did not work so for now I have deactivated the Plugin Firewall on your site.  The Plugin Firewall will not work correctly until the routing problem is fixed by your host.

    So what you need to tell your host is that there is a Proxy routing problem where your website/server ip address is being seen as an internal 10.xxx.xxx.xxx IP address instead of the correct public ip address that is:  188.95.227.20

Viewing 15 posts - 1 through 15 (of 69 total)
  • You must be logged in to reply to this topic.