Wordfence Security
Affiliate Royale login error with Wordfence (5 posts)

  1. Timotheus44
    Posted 2 years ago #

    I just bought Affiliate Royale and Wordfence is not playing nice with it.

    When I tried to login as an affiliate (as I tested the A.R. plugin), I got the following errors:

    Warning: Parameter 2 to wordfence::authActionNew() expected to be a reference, value given in (...)/public_html/wp-includes/plugin.php on line 507

    Warning: Cannot modify header information - headers already sent by (output started at (...)/public_html/wp-includes/plugin.php:507) in (...)/public_html/wp-includes/pluggable.php on line 678

    Warning: Cannot modify header information - headers already sent by (output started at (...)/public_html/wp-includes/plugin.php:507) in (...)/public_html/wp-includes/pluggable.php on line 679

    Warning: Cannot modify header information - headers already sent by (output started at (...)/public_html/wp-includes/plugin.php:507) in (...)/public_html/wp-includes/pluggable.php on line 680

    Warning: Cannot modify header information - headers already sent by (output started at (...)/public_html/wp-includes/plugin.php:507) in (...)/public_html/wp-includes/pluggable.php on line 896

    I got this error in both Safari and Firefox. When I deactivated Wordfence, I could login with no problem. Once logged in, if I reactivated Wordfence, I didn't have problems until I logged out; then I was back at the beginning with the original problem.

    Which plug-in is causing the problems, Affiliate Royale or Wordfence? Or is it that one of programs I'm using too out of date? (They're what HostGator set me up with just a few months ago.)

    Apache 2.2.26
    Wordpress 3.8.1
    PHP 5.2.4


  2. Timotheus44
    Posted 2 years ago #

    For whatever reason, Wordfence decided not to fix their code to correct this error, so Affiliate Royale had to step up and fix it for them. It is a manual fix, so every time you update Wordfence you have to go in and correct the code again. Makes me strongly consider dropping Wordfence...

    Here is the change in the code:
    *** Modify wordfence/lib/wordfenceClass.php: comment out the logic to force it to use the old version of the hook:
    if(false /*version_compare(PHP_VERSION, '5.4.0') >= 0*/){
    add_action('wp_authenticate','wordfence::authActionNew', 1, 2);
    } else {
    add_action('wp_authenticate','wordfence::authActionOld', 1, 2);

  3. Wordfence
    Plugin Author

    Posted 2 years ago #


    Unless I'm missing something, I think your PHP version being reported on your system is inconsistent. Take a look at the code.

    We say

    "If the PHP version is greater than or equal to 5.4.0 then run authActionNew. Otherwise run authActionOld"

    In your first post you said your PHP version is 5.2.4 which means you should be running authActionOld.

    However you've commented out the code to force Wordfence to run authActionOld which it would be doing anyway if you're running PHP 5.2.4.

    So the question is, why is your system PHP_VERSION constant reporting a PHP version that is equal to or newer than 5.4.0 but you're seeing your PHP version as 5.2.4.

    Let me know and I'll work with you to fix this.



  4. Richard Morrison
    Posted 2 years ago #

    I have the same problem/errors on my site, I had to deactivate wordfence.
    I have php 5.4.29
    I would appreciate a fix for this problem.
    I tried the modification listed above for wordfenceClass.php, didn't work, same errors on login.

  5. Timotheus44
    Posted 1 year ago #

    Update: I just did an update to Wordfence, meaning I again had to manually comment out this code again. Great time to test if the problem persists: it does. [Ugh!]

    I am on HostGator, and it tells me my current version of PHP is now 5.4.29. Yet I have to comment out the part to run authActionNew to make AffiliateRoyale to work. Meaning, even though I have a PHP version greater than 5.4.0, authActionOld runs better for me.

    Could the need to choose the PHP version be unnecessary? Could there be something wrong with authActionNew?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Wordfence Security
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic