Fail2ban + fail2sql + Ban Hammer + PHP7


I recently revisited a project from some time ago that I found and modified the code to support PHP7 which dropped support for mysql extension in favor of mysqli.

If you’re interested, I’ll attach the zip file   I mainly just hacked it up and added i to mysql_ functions.  Modified mysql_numrows to mysqli_num_rows and also fixed the constant MYSQL_NUM to MYSQLI_NUM and a few other tweaks in fail2sql.

Note that these are just the ban hammer HTML/PHP files, not fail2sql, so you’ll need to still grab fail2sql and get that setup. I do include fail2sql in my repo with the modified PHP now.

3 Replies to “Fail2ban + fail2sql + Ban Hammer + PHP7”

  1. Ehlo, I am quite interested in that. Would it be possible to attach the zip file ? I really want to try it on my new install !
    Thanks in advance


    1. Sure thing Antoine. I’ll let you know when I copy it over and put it in a zip.


    2. Antoine: You can clone/download (includes fail2sql modifications) from my git repo:


Leave a Reply

Your email address will not be published. Required fields are marked *