PHP Fatal error: Cannot redeclare bpspro_ap_check

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

Viewing 15 posts - 46 through 60 (of 69 total)
  • Author
    Posts
  • #23909
    jenni101
    Participant

    @aitpro – no, just php error log files. I’ll investigate later and report back. Then if i can’t find anything, it might be useful if you take a look…. Many thanks.

    #23940
    jenni101
    Participant

    Thanks for the offer. I was about to try the standard troubleshooting steps today, but then found that the error is now only happening about once per day (but when it occurs it happens about 20 times all within a few minutes of each other) which will make it almost impossible for me to check as I can’t predict when it happens/what triggers it – so can’t test against each plugin or theme. If it goes mad again then I’ll test all the plugins and give feedback here.

    So i guess I’ll just ignore it for now – though it is happening on all 3 of my sites, 2 of which are using child themes of WP themes (2014 and 2012) and one uses Kleo theme from themeforest. They do have some overlap in plugins though which might point to something in particular I guess…

    @Glasairmell did you find anything? or @Deb or @ Sweetspot – any recommendations?
    And if anyone else finds an answer perhaps they could post it here too? Thanks heaps.

    #23950
    AITpro Admin
    Keymaster

    It looks like you sent us a login to this site so we can probably figure out what is causing the problem.  Thanks.

    #23963
    jenni101
    Participant

    Thanks – sorry for the delay but our i/net went down (again!) for a few days so am just catching up now. I’ll recheck all sites to see if the errors are still occurring and if so I’ll email you the most relevant site admin login.

    Cheers.

    #23987
    jenni101
    Participant

    update: I’ve checked all 4 sites, and although all have the same errors as above they are only occasional at present. The only site that seems to get heaps of them intermittently is my ‘older’ site that I’ll be replacing shortly so have not been updating all plugins on. So as not to waste your time I’ll leave it for now, but will keep subscribed to this thread and will post again if it goes mad on one of the ‘new’ sites. Many thanks, J

    #25425
    jenni101
    Participant

    Update on this php error FYI:

    Since updating WP to 4.3.1 and BPS Pro to 11.1 I’m no longer getting any of these php fatal errors. BUT on my older site they have suddenly gone through the roof, getting them almost constantly, sometimes every second! So I thought I’d have to risk updating everything to try to resolve this problem as it was using up heaps of my server resources.

    I updated WP and BPS Pro to the latest, but no change, still the php error every second. So I disabled all plugins and turned on one by one and BINGO it seems to be WP Edit that causes the errors every time.

    The error it was showing was this:

    PHP Fatal error:  Cannot redeclare bpsPro_AP_Check() (previously declared in /home/mysite/public_html/wp-content/plugins/bulletproof-security/includes/functions.php:54) in /home/mysite/public_html/wp-content/plugins/bulletproof-security/includes/functions.php on line 64

    If you want to check it out on my site I can email you login info, as it might be easier to trouble-shoot now that the error is so frequent and predictable. I will also post this info to the WP Edit author Josh Lobe.

    Cheers, J

    #25428
    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 installed and tested the WP Edit plugin and did not see any PHP errors on my testing website.  Most likely there is something deeper going on at the server level that is the real root cause of the problem and it is affecting other things (plugins, etc) at the website level.  Yep, send me a login to this site so I can look around.  I may or may not be able to see what the root cause of the problem is if it is at the server level.

    #25431
    Josh Lobe
    Participant

    Hi.  Josh Lobe here, developer of WP Edit.

    This is the first time I’ve heard of this issue with WP Edit.  Not sure why it would cause BPS to try to run that particular function twice.  However, I am available if there is anything I can do from my end to help facilitate the resolution of this particular matter.

    Thank you everyone for your time.

    #25432
    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

    @ Josh – I believe the root problem is at the server or caching (cloud, CDN, Proxy, etc.) level and not the website (plugin) level.  Most likely it is just a random coincidence that deactivating/activating WP Edit triggers the root problem.

    #25434
    jenni101
    Participant

    Hi again,

    Thanks for agreeing to look into this – I’ve emailed you admin login details for you. Sorry if this is a wild goose chase and I apologise for potentially reflecting badly on you Josh, as I know your plugin is great! It’s just my knowledge isn’t sufficient to determine if it’s anything else.

    Look forward to your thoughts, j

    #25435
    AITpro Admin
    Keymaster

    This is a tough one to figure out.  It is only happening to a handful of people so I just need to figure out the common denominator in this equation.  I will be logging into the site tomorrow morning around 7am PST and will send you an email when I am about to login to the site.

    #25456
    AITpro Admin
    Keymaster

    UPDATE: It is confirmed that the WP Edit plugin is causing this problem and causes the Security Log not to log entries/errors. The problem is caused by a combination problem with the WP Edit plugin and XCache configuration on the host server.

    Solution: Either deactivate the WP Edit plugin or contact your web host to disable XCache or configure XCache so that it works with the WP Edit plugin.

    Other possible causes if the WP Edit plugin and XCache is not the cause of the problem:
    https://forum.ait-pro.com/forums/topic/php-fatal-error-cannot-redeclare-bpspro_ap_check/#post-21697

    Ok it turns out you were right, but I think this is going to be some sort of combination effect problem.  ie several factors are involved in this equation.  The only thing that stops the php error from occurring is deactivating WP Edit.  I checked your server’s php settings and you have Xcache, Suhosin, ZendGuard and ionCube in the mix so I disabled each of those things individually and the php error was still occurring. You have ZenCache installed so I disabled ZenCache and tested things – same php error occurred.  I found a coding mistake (left over code) in your wp-config.php file:  define('RELOCATE',true); which I commented out.  After looking at a lot of different things and changing php server settings and other plugin settings (ie turn on, off, deactivate, etc) the same php error was occurring.  Deactived WP Edit and the php error is no longer occurring.  I also upgraded to the latest WP Edit version that was just released and the same php error was occurring.  So I will look at the WP Edit code some more, but this same php error is not occurring on my test site with WP Edit installed.  So that leads me to believe the root problem still has something to do with your particular server and a chain reaction/combination problem is occurring.

    This is important and may be the actual root source of the problem.  When I turned off Xcache your php server info still showed that it was loaded.  So that might mean that your server is hard loading Xcache from the server’s php.ini file and you cannot actually really turn off Xcache locally on your website.  This is something that only your host support can tell you for sure if that is occurring and also check if Xcache is the root cause of the problem by disabling and enabling it.  It is logically a very possible cause of this type of double loading problem.

    #25461
    jenni101
    Participant

    Thanks so much for researching this – I have contacted my hosting provider who will hopefully get back to me with some useful information soon. They’re usually really good and very helpful with support queries. I’ll post here when I hear back from them.

    #25491
    jenni101
    Participant

    OK, I’m nearly there. Please let me know if you want the Xcache on or off to start with? I am just waiting to confirm what the default current setting is, and then I can switch php versions in my cPanel (but keep the same version) and then disable/enable the Xcache for you.

    #25496
    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

    What you want to look at and eliminate is some kind of conflict between:  Xcache, Suhosin, ZendGuard Loader and ionCube Loader.  XCache is a open-source opcode cacher extension, Suhosin is a PHP protection system extension that sanitizes strings and does some other things, ZendGuard Loader is a PHP Encoder and PHP Obfuscation extension, ionCube Loader is a PHP Encoder and PHP Obfuscation extension.  I would turn off Xcache first and test things.  Next I would turn off Suhosin and test things.  Next I would turn off ionCube Loader and test things.  No need to turn off ZendGuard Loader.  The general idea is you are first looking for the root source of the problem.  Then after you find that you would start looking at individual settings. Example scenario:  you turn off Suhosin and no more php errors are occurring.  You would then look at all the php.ini settings for Suhosin to try to figure out which Suhosin php.ini setting is the problem and then fix/change that setting.  It may simply be that certain php.ini settings for one or more of these extensions have known conflicts/problems with each other.

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