WordPress.org

Ready to get started?Download WordPress

Forums

WP Statistics
[resolved] Multi-page posts do not render (25 posts)

  1. MichelV69
    Member
    Posted 5 months ago #

    Example page

    If the plugin is active, the page comes up "blank" to the viewer, and the log shows:

    ==> /var/log/httpd/error_log <==
    [Sat Mar 08 19:59:52 2014] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
    [Sat Mar 08 19:59:52 2014] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
    [Sat Mar 08 19:59:52 2014] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/

    ... and no HTML is delivered to the browser at all, nor error page.

    Disabling the plugin results in the page rendering correctly.

    https://wordpress.org/plugins/wp-statistics/

  2. Greg Ross
    Member
    Plugin Author

    Posted 5 months ago #

    There are probably two php extensions to verify you have installed, cURL and bcmath. Both are required for the GeoIP code.

  3. MichelV69
    Member
    Posted 5 months ago #

    Can you explain why non-multi-page posts come up fine, whereas only the multi-page posts are affected by the bug before I worry about installing those two components for the GeoIP system?

  4. Greg Ross
    Member
    Plugin Author

    Posted 5 months ago #

    Nope, but usually when we see blank pages it's because there is a missing library. The 5.2 release includes checks for them.

    The other place to look is in your PHP error logs. The web server logs aren't very helpful in these cases usually.

  5. Greg Ross
    Member
    Plugin Author

    Posted 4 months ago #

    Closing topic.

  6. MichelV69
    Member
    Posted 2 months ago #

    Hi there.

    I've had this plugin disabled for some time, but noticed you'd gone up to v6, so turned it back on.

    As before, it still throws a blank page (zero bytes, no source) on multi-page posts.

    My php error log is empty.

    The web server shows:

    [20/Jun/2014:17:33:20 -0300] "GET /2013/10/08/home-project-basement-aquaponics-test-system-part-2/ HTTP/1.1" 500 - "http://michelrvaillancourt.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36"

    ... you so can see the error code 500 there, so clearly something is breaking.

    Restarting my webserver entirely shows the following in the HTTPD error log:

    ==> error_log <==
    [Fri Jun 20 17:08:55 2014] [warn] mod_fcgid: stderr: WordPress database error Duplicate key name 'location' for query ALTER TABLE wp_statistics_visitor ADD KEY <code>location</code> (<code>location</code>) made by activate_plugin, include_once('/plugins/wp-statistics/wp-statistics.php'), include_once('/plugins/wp-statistics/upgrade.php'), dbDelta
    [Fri Jun 20 17:08:55 2014] [warn] mod_fcgid: stderr: WordPress database error Multiple primary key defined for query ALTER TABLE wp_statistics_exclusions ADD PRIMARY KEY (<code>ID</code>) made by activate_plugin, include_once('/plugins/wp-statistics/wp-statistics.php'), include_once('/plugins/wp-statistics/upgrade.php'), dbDelta
    [Fri Jun 20 17:08:55 2014] [warn] mod_fcgid: stderr: WordPress database error Duplicate key name 'date' for query ALTER TABLE wp_statistics_exclusions ADD KEY <code>date</code> (<code>date</code>) made by activate_plugin, include_once('/plugins/wp-statistics/wp-statistics.php'), include_once('/plugins/wp-statistics/upgrade.php'), dbDelta
    [Fri Jun 20 17:08:55 2014] [warn] mod_fcgid: stderr: WordPress database error Duplicate key name 'reason' for query ALTER TABLE wp_statistics_exclusions ADD KEY <code>reason</code> (<code>reason</code>) made by activate_plugin, include_once('/plugins/wp-statistics/wp-statistics.php'), include_once('/plugins/wp-statistics/upgrade.php'), dbDelta
    [Fri Jun 20 17:12:55 2014] [warn] mod_fcgid: stderr: PHP Warning:  parse_url(http://) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse URL in /home/siteadmin/public_html/wp-content/plugins/wp-statistics/includes/log/log.php on line 259
    [Fri Jun 20 17:13:01 2014] [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function
    [Fri Jun 20 17:13:07 2014] [warn] mod_fcgid: stderr: PHP Warning:  parse_url(http://) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse URL in /home/siteadmin/public_html/wp-content/plugins/wp-statistics/includes/log/log.php on line 259
    [Fri Jun 20 17:13:13 2014] [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function
    [Fri Jun 20 17:13:19 2014] [warn] mod_fcgid: stderr: PHP Warning:  parse_url(http://) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse URL in /home/siteadmin/public_html/wp-content/plugins/wp-statistics/includes/log/log.php on line 259
    [Fri Jun 20 17:26:01 2014] [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function

    I've got time to hunt this issue down now, so if you can give me some specific instructions about how to hunt this down, I'm willing to do what I can.

  7. Greg Ross
    Member
    Plugin Author

    Posted 2 months ago #

    The PHP warning about parse_url() can be ignored.

    The

    (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function

    is because you haven't configured Apache with enough fastcgi requests.

    Stackoverflow says:

    http://stackoverflow.com/questions/12477627/mod-fcgid-ap-pass-brigade-failed-in-handle-request-function

    And if you scoll down a bit to the "Special PHP considerations" area of the Apache documentation here:

    http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#examples

  8. Greg Ross
    Member
    Plugin Author

    Posted 2 months ago #

    Out of curiosity, what version of PHP are you running?

  9. MichelV69
    Member
    Posted 2 months ago #

    [root@web01 logs]# which -a php
    /usr/bin/php
    [root@web01 logs]# php -v
    PHP 5.2.17 (cli) (built: Jan 16 2011 22:43:26)
    Copyright (c) 1997-2010 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies

    It's what's bundled with the Virtualmin version 4.08 Pro / Webmin version 1.690 system.

    I'll read up those two articles you linked and get back to you.

  10. MichelV69
    Member
    Posted 2 months ago #

    Ok, so, I'm actually running

    modules/mod_fcgid.so

    ... and not

    mod_fastcgi.c

    ... which those StackOverflow articles point at. I'm doing some research right now into how to get mod_fcgid.so / Server version: Apache/2.2.3 (Server built: Oct 10 2013 12:56:26) to play nice.

    I'm not entirely convinced this is a horrid issue with FastCGI, affecting the plugin, however. I say that, because the only time the problem happens is on multi-page posts ... if I remove the page-break from the post, the problem goes away.

    Based on those tests I strongly suspect something about the pagebreak logic is causing the plugin a heart-attack.

    Let me know what other testing / info you need.

  11. Greg Ross
    Member
    Plugin Author

    Posted 2 months ago #

    Actually the stackoverflow article talks specifically about mod_fcgid as does the linked Apache document.

    I assume what is happening is that the multi-page posts + WP Statistics is tipping the request limit over the allowed value. This will then cause the 500 error.

    WP Statistics does not touch the core logic of WordPress on a page load. We execute well after WordPress has completed its work at the very end of the PHP execution just before it exits.

    You may also just be running in to an incompatibility with such an old version of PHP.

  12. MichelV69
    Member
    Posted 2 months ago #

    Both documents you linked specifically reference mod_fcgid.c ... however, in my fcgid.conf:

    LoadModule fcgid_module modules/mod_fcgid.so
    
    # Use FastCGI to process .fcg .fcgi & .fpl scripts
    # Don't do this if mod_fastcgi is present, as it will try to do the same thing
    <IfModule !mod_fastcgi.c>
        AddHandler fcgid-script fcg fcgi fpl
    </IfModule>

    The problem, thus, is that none of the config options mentioned in those two documents seems to apply. :/ The HTTPD stack errors out on restart.

    I'm going to roll back to v5.1 and see if the issue persists or not. I know that I used this plugin for a couple months before an update caused the initially reported issue.

    I'll let you know what happens.

  13. Greg Ross
    Member
    Plugin Author

    Posted 2 months ago #

    An older version may work as we have added code to the plugin that may be pushing it over the limit. Likewise you probably were on an older version of WordPress.

    You should have another configuration section to setup fcgid, however I'm not an Apache expert so I can't help much here. You may not have any other options listed, but they will be set to the defaults in that case.

    I think your best option is to find your php wrapper script and make the change as suggested in the Apache documentation.

  14. MichelV69
    Member
    Posted 2 months ago #

    Ok. So I actually rebuilt the server from scratch:

    [root@web01a conf.d]# which -a php
    /usr/bin/php
    [root@web01a conf.d]# /usr/bin/php -v
    PHP 5.3.3 (cli) (built: Dec 11 2013 03:29:57)
    Copyright (c) 1997-2010 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    [root@web01a conf.d]# which -a httpd
    /usr/sbin/httpd
    [root@web01a conf.d]# /usr/sbin/httpd -v
    Server version: Apache/2.2.15 (Unix)
    Server built:   Aug 25 2013 11:27:22
    [root@web01a conf.d]# uname -a
    Linux web01a 2.6.32-431.20.3.el6.x86_64 #1 SMP Thu Jun 19 21:14:45 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

    WordPress 3.9.1

    ... it's still not working. With FCGI enabled or disabled, it does not work. Mod_php, it does not work.

    Can you make some suggestions as what to try next?

  15. Greg Ross
    Member
    Plugin Author

    Posted 2 months ago #

    Are you still seeing the same error in the log?

    Have you tried disabling all of your other plugins?

  16. MichelV69
    Member
    Posted 2 months ago #

    Alright. So after about an hour of experimentation, the issue seems to be an interaction between WordPress Statistics and Antispam Bee (http://antispambee.com) . If I disable ASB with WP-Stats activated, then a multi-page post is visible.

    If both are active, then multi-page posts don't work.

    If only one of either are active, then they do.

    I'm already using Askimet for spam-fighting, so ASB is a secondary tool. If I have to drop one of the two between ASB and WP-Stat, then I can "afford" to drop ASB.

    You'll likely want to see if you can reproduce the issue and pin it down... having a stat tracker that has an issue with anti-spam software isn't great news.

  17. MichelV69
    Member
    Posted 2 months ago #

    ... alright, I've made some more progress. The problem is the widget.

    If I remove the Widget from my screen set up, then it doesn't matter what plugins I do or do not have loaded.

    With the Widget loaded and ABS disabled, get_sidebar() hangs and get_footer() is never called; the widget was installed in my sidebar.

  18. Greg Ross
    Member
    Plugin Author

    Posted 2 months ago #

    The Widget for WP Statistics or for Anispam Bee?

  19. MichelV69
    Member
    Posted 2 months ago #

    My apologies for not being clear. I meant the Widget for WP Statistics.

    When I have some time this evening, I'll post a JPG of what it looks like ... it actually *starts* to render the widget contents and then dies there.

  20. Greg Ross
    Member
    Plugin Author

    Posted 2 months ago #

    I installed ASB and enabled the WPS widget on my test site with a multi-page post and everything seems ok.

    Perhaps it's a conflict between ASP + WPS + Your Theme?

    Can you try disabling everything but ASP and WPS and using the 2014 theme?

  21. MichelV69
    Member
    Posted 1 month ago #

    Ok, I'll go do that next and report back. However, some experimentation to this point seems to indicate that as long as I do not have the "Total Visitors" option checked in the Widget, everything works fine. I can literally turn every other option in the Widget on and all is well.

    If the ONLY option in the Widget I have enabled is "Total Visitors", it dies with the above symptoms.

    I'll try 2014 and let you know what happens.

  22. MichelV69
    Member
    Posted 1 month ago #

    With the "Twenty Fourteen" theme enabled, instead of "Runo Lite", I get the same behavior.

    I'll leave 2014 up for now, with the Widget enabled less the "Total Visitors" option marked if you want to look at the site for some reason. http://michelrvaillancourt.com/

    Let me know if you need anything else tested / checked on.

  23. Greg Ross
    Member
    Plugin Author

    Posted 1 month ago #

    Try the following, edit wp-content/plugins/wp-statistics/widget.php, line 34 should be:

    echo wp_statistics_visitor('today');

    replace it with:

    echo wp_statistics_visitor('today', null, true);

    Then re-enable the total visitors in the widget.

  24. MichelV69
    Member
    Posted 1 month ago #

    Ok. That did not work. However, the following change:

    line 83/199:
    echo wp_statistics_visitor('total', null, true);

    ... did correct the issue. Confirmed working as expected in the 2014 and Runo Lite themes, regardless of what other plugins are loaded.

  25. Greg Ross
    Member
    Plugin Author

    Posted 1 month ago #

    Looks like the combination of plugins is running out of resources somewhere.

    wp_statistics_vistor() returns a SQL result containing all the vistor records by default.

    The extra 'true' at the end that I added returns only the number of records, not the result set, which of course takes a lot less in the way of resources.

    I'll make the change in the next release.

Reply

You must log in to post.

About this Plugin

About this Topic