Maybe you need to build your own lsphp binary to include all required PHP modules. checkout our wiki for tutorials.
You can write a shell script or whatever script language you prefer, to parse lsws/logs/error.log, looking for IP addresses hit the "Connection hard limit", automatically ban...