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

    (@invisnet)

    May I ask why you’re not using at least PHP 5.3? I know some hosting companies take a little while to get around to upgrading, but surely 829 days is long enough? (http://php.net/eol.php)

    Thread Starter AleksCee

    (@alekscee)

    Hi,

    because of the normal packet repository of “Ubuntu 8.04.4 LTS”. But you are right, I will upgrade the OS because the EOL of it in this month….

    related to eAccelerator:

    eAccelerator is not compatible with anonymous function/closure!
    more details here: https://github.com/eaccelerator/eaccelerator/issues/12

    so as a workaround:

    add_action( 'wp_login', 'fail2ban_onLogin' ,10,2);
    function fail2ban_onLogin($user_login, $user)
    {
    	openlog('wordpress('.$_SERVER['HTTP_HOST'].')',LOG_NDELAY|LOG_PID,LOG_AUTH);
    	syslog(LOG_INFO,"Accepted password for $user_login from {$_SERVER['REMOTE_ADDR']}");
    }
    
    add_action( 'wp_login_failed', 'fail2ban_onLoginFailed');
    function fail2ban_onLoginFailed($username)
    {
    	openlog('wordpress('.$_SERVER['HTTP_HOST'].')',LOG_NDELAY|LOG_PID,LOG_AUTH);
    	syslog(LOG_NOTICE,"Authentication failure for $username from {$_SERVER['REMOTE_ADDR']}");
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Anonymous functions’ is closed to new replies.