• Resolved alexhaid

    (@alexhaid)


    Hi Guys. Wanted to start using Fail2ban, but ran into this error on activation of the plugin:

    Plugin could not be activated because it triggered a fatal error.
    Fatal error: Cannot redeclare org\lecklider\charles\wordpress\wp_fail2ban\wp_login_failed() (previously declared in /var/www/html/wp-content/mu-plugins/wp-fail2ban.php:283) in /var/www/html/wp-content/plugins/wp-fail2ban/wp-fail2ban.php on line 366

    https://paste.pics/3b3426f231fbec1b57ed64f86b7e9d8b

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author invisnet

    (@invisnet)

    It looks like you’ve got an old version in mu-plugins. The best way to use WPf2b with mu-plugins is with a symlink – exactly to prevent this kind of thing. See https://docs.wp-fail2ban.com/en/3.6/configuration.html#mu-plugins-support

    • This reply was modified 6 years, 2 months ago by invisnet.
    Plugin Author invisnet

    (@invisnet)

    I assume that solved the problem.

    Thread Starter alexhaid

    (@alexhaid)

    Thanks invisnet.

    Right, I’m using a Digital Ocean One-Click-WP Droplet and seems like they’ve got WPf2b preinstalled.

    /var/www/html/wp-content/mu-plugins$ ll
    -rw-r–r– 1 www-data www-data 9051 Aug 21 2016 wp-fail2ban.php

    I removed the file from mu-plugins and installed/activated WPf2b from the Plugins backend.

    I was wondering if I additionally should do the symlink suggestion you’ve made now. Necessary? What’s the advantage of that?

    • This reply was modified 6 years, 1 month ago by alexhaid.
    • This reply was modified 6 years, 1 month ago by alexhaid.
    Plugin Author invisnet

    (@invisnet)

    So they have (I just fired up a test droplet).

    While it’s nice to see them installing it by default, it would have been even nicer if they’d let me know so I could cover it in the docs. I shall have a chat with them.

    Anyway, you don’t need to add the symlink unless you need to run WPf2b as a mu plugin. You probably don’t, so you probably don’t ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal error: Cannot redeclare wp_login_failed()’ is closed to new replies.