WordPress.org

Ready to get started?Download WordPress

Forums

LeagueManager
Matches not updateing (4 posts)

  1. robdalton
    Member
    Posted 2 years ago #

    Hi, My matches are not updateing, I put in results, and click Update Results, and the process does not finish. i am rather clueless when it comes to troubleshooting code, but the plugin worked superbly for the last four months, it is only recenlty that it has stopped working...
    please, any help would be appreciated!

    http://wordpress.org/extend/plugins/leaguemanager/

  2. MyUtd4Life
    Member
    Posted 2 years ago #

    Same problem, please update!

  3. LaMonte Forthun
    Member
    Plugin Author

    Posted 2 years ago #

    There's a known problem with update large number of matches at one time. If you can filter by match day, it works very well. It's not my plug-in, but I've been looking at some bugs, I'll see if I can track this one down this week.

  4. LaMonte Forthun
    Member
    Plugin Author

    Posted 2 years ago #

    This problem is based on a PHP update (introduced in 5.3.9) that introduced a setting to help prevent hash collision attacks. The setting is "max_input_vars" and is defaulted to be set at 1,000.

    The problem with updating an entire season, or even a few weeks worth, of matches is there are a lot of variables per game and those variables add up quickly when you're limited to 1,000.

    The best solution would be to re-write the code to work on a few lines at a time instead of grabbing all the code at once and then updating game by game, and I'm looking at it to see if I can do that (keeping in mind that League Manager isn't my plug in).

    In the mean time, there are two solutions:

    1). Make sure you have match days defined in the season (how many matches per season), then make sure when you add a match you have a match day assigned to the match. When you go to update matches, filter by match day so you are only working with game 12 or whatever, so that the number of updates and variables used stays under the limit. If you've got 36 teams in a league and you're trying to update 18 games at a time, you might run into the problem anyway and you'll need to see solution 2. There are a lot of reasons that this is the best option, but the best reason is that it doesn't involved anything like code changing or server tweaking...

    2). This isn't the ideal solution because it's bypassing a setting that's been added to PHP to avoid a vulnerability. The solution is to increase the number of variables that can be set at one time from 1,000 to some number higher. If you have access to your server's php.ini file and know how to modify files on a server, you can add or modify the max_input_vars setting like this:

    max_input_vars = 2,500

    You can also change this setting in an .htaccess file in your local word press directory like this (they are different, if you put the above code in an htaccess file you'll get a server error):

    php_value max_input_vars 2500

    I've tested this and it does work. If you find that the number isn't high enough, add another 500 or 1,000, but I wouldn't recommend throwing 10,000 in right away as the purpose of the restriction was to close a PHP vunerability.

    If I can figure out how to update the code to work with a group of matches at a time so that the problem goes away, I'll update the code here.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic