Cannot redeclare ExcludePHPELogDB in admin.php on line 68

Home Forums BulletProof Security Pro Cannot redeclare ExcludePHPELogDB in admin.php on line 68

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #3767
    Bro Ignatius Mary
    Participant

    I tried to go into the admin screen of one of my wordpress blogs. For about the fourth time, it would not let me in and gave error messages instead. I finally got in, but had to delete bulletproof to do it. I also deleted BB tables in the db. Then went to reinstall the BB plugin and I keep getting this:

    Fatal error: Cannot redeclare ExcludePHPELogDB() (previously declared in /httpdocs/bubba/wp-content/plugins/akismet/admin.php:53) in /httpdocs/bubba/wp-content/plugins/bulletproof-security/admin/includes/admin.php on line 68

    what is going on?

    #3769
    AITpro Admin
    Keymaster

    The Forum Topic title you chose was not helpful so it has been changed.  Please start from the beginning of the issue/problem.

    What started the issue/problem?

    What was the error message?

    A “cannot redeclare” php error means that the function is seen in another file.  It basically means this function already exists so it cannot be executed/processed/declared again.   Delete any bulletproof-security plugin folders that you see in your /plugins folder.  Then reinstall the BPS Pro zip file.

    #3779
    Bro Ignatius Mary
    Participant

    I have installed and de-installed the BP plugin about 4-5 times now. Each time deleting the BP folder and going into the db to delete any BP tables. Nothing works. The error message remains.

    I was using Chrome, but tried a clean install with Internet Explorer. Made no difference

     

    #3780
    Bro Ignatius Mary
    Participant

    It finally activated, but I had to deactivate akismet. I have no idea why. I do need to use akismet, so I guess we will see what happens when a I reactivate akismet.

    #3781
    Bro Ignatius Mary
    Participant

    When I reactivated akismet the same error came up. Do I deleted askismet completely and reinstalled it and reactivated it. It seem to work now. There must have been a corrupted file in askismet.

    thanks

    #3783
    AITpro Admin
    Keymaster

    What was very strange to me was this:  Cannot redeclare ExcludePHPELogDB() (previously declared in /httpdocs/bubba/wp-content/plugins/akismet/admin.php:53.  Akismet does not have a function called ExcludePHPELogDB at all.  Only BPS Pro has this function.  So I am going to take a logical guess here and guess that somehow the Akismet admin.php file was replaced by the BPS Pro admin.php file somehow.  The only logical explanation for something like this would be if the /plugins/akismet folder was actually a /bulletproof-security folder accidentally renamed to /akismet or if the BPS Pro admin.php file was accidentally copied to the /akismet folder.  Or maybe something like this occurred.  After deleting BPS Pro database tables then maybe trying to do a Quarantine Restore File somehow could have caused this?  I have no idea if that is even possible and am just guessing.

    Normally you would not have to do anything manually with deleting BPS Pro database tables and options.  If you deactivate and uninstall BPS Pro all database tables and options are deleted.  Most issues/problems can be resolved without having to do something like this and just using the arqdelete.php script and deleting the /bulletproof-security plugins folder will solve every type of issue/problem.

    See this ARQ Troubleshooting Forum section:  http://forum.ait-pro.com/forums/topic/autorestore-quarantine-guide-read-me-first/#ARQ-Troubleshooting

    #3784
    Bro Ignatius Mary
    Participant

    I have no idea. It was weird. What counts is that it works now. 🙂

    #3787
    AITpro Admin
    Keymaster

    Actually I just remembered something very similar to this issue/problem.  Did you by any chance update all plugins at the same time?  You can do this on the WordPress Dashboard Updates page and select all plugins and themes to update at the same time.

    I need to block BPS Pro from being allowed to be installed like this because BPS Pro is installed from the AITpro API Server and WordPress plugins and Themes are installed from the WordPress Server.  What I have seen/fixed once is this.  During the process of updating all plugins at once causes all plugin files to be sent to Quarantine.  This is because the class.php file, which contains the AutoRestore/Quarantine Exclude filters is not installed right away and/or the automatic functions that grab and reinstate your Exclude filters do not happen in time to prevent ALL plugin files from being sent to Quarantine.

    #3807
    Bro Ignatius Mary
    Participant

    Yes, when update notices appear in the dashboard, I update them en masse. I turn off the AutoRestore before doing this.

     

    #3808
    AITpro Admin
    Keymaster

    BPS Pro automatically creates a duplicate/backup copy of your class.php file that contains all of your ARQ exclude filters that you create and stores it in the /bps-backup/master-backups folder.  Any time you add or remove exclude filters your backup class.php file is always updated.

    What happens during a normal BPS Pro upgrade from the AITpro API Server is this:

    The BPS Pro upgrade contains a standard class.php file that does not contain your particular exclude filters that you have created for your website.  So on upgrade installation your class.php file that is stored in the /master-backups folder is copied back into BPS Pro and overwrites the standard class.php file that is in the BPS Pro upgrade.  This happens pretty much instantly on upgrade so that AutoRestore does not kick in and start quarantining files.

    Unfortunately, what happens though if you do a mass plugin upgrade is that the backup class.php file is not copied back to your website in time to stop AutoRestore from quarantining files.  Why that occurs I am not exactly sure, but what I am sure of is that if you do a mass plugin upgrade and include BPS Pro in that mass upgrade then plugin files will be quarantined guaranteed.

    Overall BPS Pro does as many things as possible at the code and file writing level (the class.php file is just one of many examples).  The reason for this, which is much more difficult and complex to do by the way, is that the most resource draining thing about a WordPress site is database queries.  The more database queries you have firing at any given time or over extended periods of time or continuously then the slower your website will perform and load.  First priority is security, but not at the cost of website performance – that is not an acceptable trade-off.

    Using the mass plugin upgrade is like installing 2 different application upgrades on your computer from 2 different websites if you are installing BPS Pro at the same time your are installing plugins from the WordPress Server.  Not a good idea.  The mass upgrade works fine if you are only installing WordPress plugins all from the same WordPress Server, but since BPS Pro exists on the AITpro API Server then you are installing applications from 2 different Servers at the same time.

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