I'm getting a PHP fatal error when accessing Connect Manager in Magento

I've updated to php 7.2 on Ubuntu with Nginx. The files and folders have nginx user as owner and the file permissions are correct.

Everything else seems to work ok, but just can't access the Connect Manager. If I put Magento in developper mode I still get no errors, just the 500 error from the server.

Here's the error:

FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught DivisionByZeroError: Modulo by zero in /path/to/magento/downloader/Maged/BruteForce/Validator.php:59

Stack trace:

0 /path/to/magento/downloader/Maged/Controller.php(844): Maged_BruteForce_Validator->isCanLogin()
1 /path/to/magento/downloader/Maged/Controller.php(518): Maged_Controller->dispatch()
2 /path/to/magento/downloader/index.php(36): Maged_Controller::run()
3 {main}

Any ideas how to fix this?


1 Answer 1


In case somebody else has this error.

Just delete the bruteforce.ini in the var folder. I at first only modified the file, not remove it. Not sure if some date / file permission check is done to it too. Here's what the bruteforce.ini looks like after magento regenerated it:

brute-force-bad-attempts-count = 0
brute-force-diff-time-to-attempt = 180

I first edited it myself the sameway, but that didn't work.

Also remember if you have Nginx blocking download folder to allow it while using Magento Connect! This in case you get the 404 error, ofcourse.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.