Forum Replies Created

Viewing 15 replies - 16 through 30 (of 34 total)
  • Thread Starter glouton

    (@glouton)

    Wait… I think I’m being stupid here.

    It’s all because IP is blocked (or locked out) for 60 minutes only, as per the settings. Then it’s automatically unlocked. Isn’t it?
    And I can still see “blocked” in Activity tab because it’s a log.

    Sorry, I was overthinking something obvious.

    Thread Starter glouton

    (@glouton)

    Hi there,

    Thank you for you new answer and helping to sort this out.

    If I click the “IP blocked” button on the Activity tab the I have a list of IP addresses with “IP subnet blocked” written in white on red background in the “Event” column + the reason.

    But the Lockouts tab is still empty (empty again even) and, as a result, I still can’t find a way to unblock any of the IP address.

    https://mega.nz/file/cnxBGCbC#SPfrRbr16QVJ3HSsUZ4HGqb_9m9V-Gb-YjzMnw6Iwts

    Regards,

    Thread Starter glouton

    (@glouton)

    Hello,

    I can see these IP addresses on the dashboard tab or activity tab.

    Right now I have two new locked out IP addresses (and only two) that do show on lockouts tab, but still not the others.

    https://mega.nz/file/0nIjFQ6Y#g7IkCvZ4MqmQTPITmjbvf1TanFZJdEPsforbTlpJHiw
    https://mega.nz/file/crJlmaQa#rCNE1LbiUf_tIqqm8yEMOcrHWB7v4UM6yD8nBTXVVFE

    Thread Starter glouton

    (@glouton)

    Hello,

    I have been silly, it was an OPcache issue and it works fine after restarting php-fpm.

    Sorry for the bother.

    Thread Starter glouton

    (@glouton)

    PS : I don’t receive the automatic email after install but I do receive one when deactivating the plugin.
    In this email I can see that it’s my IPv6 address.
    Does it only support IPv4?

    Thread Starter glouton

    (@glouton)

    Hi there,

    On the same clean WordPress with my dummy Minutely event plugin, I’ve removed the previous WP Cerber and installed this 8.5.4 one.

    No more “header already sent” in log indeed.

    Thanks for fix.

    Thread Starter glouton

    (@glouton)

    So there was something.

    Thanks for the fix, I’ll test it asap.

    Thread Starter glouton

    (@glouton)

    Sorry, forgot the dummy-cron.php

    <?php
    /**
     * Plugin Name: Dummy Cron
     */
    function my_add_minutely( $schedules ) {
        // add a 'minutely' schedule to the existing set
        $schedules['minutely'] = array(
            'interval' => 60,
            'display' => __('Once Minutely')
        );
        return $schedules;
    }
    add_filter( 'cron_schedules', 'my_add_minutely' );
    
    register_activation_hook(__FILE__, 'my_activation');
    
    function my_activation() {
        if (! wp_next_scheduled ( 'my_minutely_event' )) {
            wp_schedule_event(time(), 'minutely', 'my_minutely_event');
        }
    }
    
    add_action('my_minutely_event', 'do_this_minutely');
    
    function do_this_minutely() {
        // do something every minute
        error_log( 'My minutely event.' );
    }
    
    register_deactivation_hook(__FILE__, 'my_deactivation');
    
    function my_deactivation() {
        wp_clear_scheduled_hook('my_minutely_event');
    }
    Thread Starter glouton

    (@glouton)

    Hello,

    That’s really weird!
    I launched the same test I ran for the others.

    • Start with a fresh install of WordPress 5.3
    • Install and activate WP Cerber
    • Install and activate my single file dummy cron plugin below

    See the result in the the attached log, tones of “headers already sent” after installing your plugin and then 4 every minute because of the cron.

    After the WordPress install I’ve check cron in the database, table wp_options with option_name = ‘cron’.
    There was only core tasks.
    Then I activated WP Cerber and had 2 warnings in log right after activation + WP Cerber cron tasks added on database.
    Then I activated my dummy cron which added to more warnings in log.

    >> The plugin works just fine on PHP 7.X except your case. Perhaps someone else came across the same issue but nobody has reported yet.

    I might be wrong but it really look like the plugin raises this warning when WordPress cron task runs. Which is a core functionnality.

    I running PHP 7.3.11 with Apache 2.4.6 and PHP-FPM under Centos 7.7

    PHP-FPM log file: https://mega.nz/#!YjYzwS5R!o-twJ8Wh6lUnIQv-wZnJJ1JBnn7UWiNw5S4kxKfVwzg
    WordPress Extensions: https://mega.nz/#!56BXDAZY!uKlJ7yEaARcG3u-hknMZm7Lgu3N2JkvpiO_jvug0dTM

    • This reply was modified 6 years, 8 months ago by glouton.
    Thread Starter glouton

    (@glouton)

    PS:

    I’ve installed WP Cerber locally and on test environment and have the warning on both.

    I haven’t deployed it to production yet, where I don’t have the warning.

    Thread Starter glouton

    (@glouton)

    Hello,

    Thank you for answering but I really think you’re wrong.

    I’ve had this with other plugins, explaining the authors i’ve checked and clean all the code, tested one clean WordPress install… etc..

    One has fixed his own code, CPB Poll:
    https://wordpress.org/support/topic/headers-already-sent-39/

    One kept pretending “it’s not us, it’s someone else”, Contact Form 7 Multi-Step Forms:
    https://wordpress.org/support/topic/hea/

    Former fixed the issue, later did nothing and message in log did indeed vanish after removing this extension.

    I know what can cause header already sent warning. But then again, didn’t have it before installing WP Cerber.

    And as I pointed here and for the other plugin authors, it’s because wp-cron.php calls fastcgi_finish_request() if you run PHP 7.0.16 >=, which sends headers.

    But that’s a WordPress core file. So it depends if you want you plugin to be compatible with WordPress and PHP >= 7 or not.

    Regards,

    Thread Starter glouton

    (@glouton)

    Hi,

    The empty first line is just a formatting thing when posting to the forum indeed.
    Of course I don’t have it in orignal code, set nobomb in Vim and checked for trailing white spaces with phptags.

    Furthermore let me remind you that I first had these warnings on a real project.
    I added this little cron-test only to confirm what I found after days of digging.

    Maybe you can’t reproduce because you did not enable WP_DEBUG and WP_DEBUG_LOG.
    If this is the case I suggest that you do. Simplest way is to copy paste the example at the bottom of this WordPess Codex page:

    Debugging in WordPress

    Thread Starter glouton

    (@glouton)

    (not saying hello as you never bothered)

    If by “the other developers” and “their plugin” you mean codeboxr, Sabuj Kundu and the CBX Poll plugin then yes indeed THEY looked into it and fixed THEIR plugin.

    You on the other hand didn’t fixed anything and plugin still face exactly the same issue.

    Again, as already said before, with only WordPress + CF7 + CF7 Multi-steps + my little plugin to run cron minutely and the warnings are having a party in the log.
    See install plugins in this screenshot:
    https://mega.nz/#!gm5RBITY!e1ul-bRC8Wb55O55b-u8M4gj2o2TrewE_WQv2YfMxXw

    I guess you can download their plugin and look at how they fixed it.
    I pointed you to the right direction telling you when and where it happens and even almost the why. It has something to do with PHP version >= 7.0
    From my original post “I’ve managed to narrow it down to wp-cron.php on line 23 with fastcgi_finish_request()”

    Here the log right now (again with only you plugin and a dummy cron task):

    
    [23-Sep-2019 07:54:58 UTC] PHP Warning:  Cannot modify header information - headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 106
    [23-Sep-2019 07:54:58 UTC] PHP Warning:  session_start(): Cannot start session when headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 110
    [23-Sep-2019 07:54:58 UTC] My minutely event.
    [23-Sep-2019 07:56:33 UTC] PHP Warning:  Cannot modify header information - headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 106
    [23-Sep-2019 07:56:33 UTC] PHP Warning:  session_start(): Cannot start session when headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 110
    [23-Sep-2019 07:56:33 UTC] My minutely event.
    [23-Sep-2019 08:01:41 UTC] PHP Warning:  Cannot modify header information - headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 106
    [23-Sep-2019 08:01:41 UTC] PHP Warning:  session_start(): Cannot start session when headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 110
    [23-Sep-2019 08:01:41 UTC] My minutely event.
    [23-Sep-2019 08:02:44 UTC] PHP Warning:  Cannot modify header information - headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 106
    [23-Sep-2019 08:02:44 UTC] PHP Warning:  session_start(): Cannot start session when headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 110
    [23-Sep-2019 08:02:44 UTC] My minutely event.
    [23-Sep-2019 08:04:44 UTC] PHP Warning:  Cannot modify header information - headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 106
    [23-Sep-2019 08:04:44 UTC] PHP Warning:  session_start(): Cannot start session when headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 110
    [23-Sep-2019 08:04:44 UTC] My minutely event.
    [23-Sep-2019 08:06:36 UTC] PHP Warning:  Cannot modify header information - headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 106
    [23-Sep-2019 08:06:36 UTC] PHP Warning:  session_start(): Cannot start session when headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 110
    [23-Sep-2019 08:06:36 UTC] My minutely event.
    [23-Sep-2019 08:07:36 UTC] PHP Warning:  Cannot modify header information - headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 106
    [23-Sep-2019 08:07:36 UTC] PHP Warning:  session_start(): Cannot start session when headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 110
    [23-Sep-2019 08:07:36 UTC] My minutely event.
    [23-Sep-2019 08:09:36 UTC] PHP Warning:  Cannot modify header information - headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 106
    [23-Sep-2019 08:09:36 UTC] PHP Warning:  session_start(): Cannot start session when headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 110
    [23-Sep-2019 08:09:36 UTC] My minutely event.
    [23-Sep-2019 08:11:36 UTC] PHP Warning:  Cannot modify header information - headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 106
    [23-Sep-2019 08:11:36 UTC] PHP Warning:  session_start(): Cannot start session when headers already sent in /Nightcrawler/projects/WordPress/www/wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php on line 110
    [23-Sep-2019 08:11:36 UTC] My minutely event.

    If you don’t want to fix it that’s not of my business, I have remove your plugin anyway and wasted way enough time with that.

    Thread Starter glouton

    (@glouton)

    Hi there,

    Thank you for this new version.

    It seems to fix the “header already sent” warning indeed.

    Regards,

    Thread Starter glouton

    (@glouton)

    Hi there,

    I think I just proved to you that on the contrary there is a problem with this plugin and that CBX Poll plugin has the same one.

    Your plugin does not run anything in WP Cron but it does issue the error in log when the cron runs. This is precisely what my test above shows.
    Means it’s hooked somewhere the wrong way because it’s called when the cron runs.

    Please read my answer carefully once more.

    basically, WP Cron runs > Your plugin tries to start session.

    This is wrong and shouldn’t happen.
    Your plugin does not have any issue as long as no WP Cron task runs.
    But there are cron task even in core WordPress. Cron task in WooCommerce and many other very famous plugins.
    As a result, your plugin seems flawed.

    I think I’ve already done a lot of work for you trying to narrow down the problem.
    The least you could do is address it and have a look into it.

    PS: if you check the support thread on CBX Poll side you’ll see that their answer to this issue is “We are checking, will give feedback asap.”

Viewing 15 replies - 16 through 30 (of 34 total)