Quote:
Originally Posted by KeatonM
This is great!
My question, however, is regarding the number of events you can have.
...
I added the fourth event, and the page no longer seems to cache and update. I'm not awesome with PHP, so I'm wondering if three events is the max, hardcoded number in the script, or if I should be able to add the fouth event.
Thanks again for coding this!
|
Interesting. Yes, you should be able to add all the events you attended. I just tried it, and it worked fine for me. PHP is often set up differently on different servers, however, which means that it behaves differently.
It does work with just three, right?
Try the following:
1. Make sure that your team number is properly defined in the config file. It should read:
PHP Code:
$teamnumber=27;
2. Try adding the following line to the config file while testing, but be sure to remove it before publication:
PHP Code:
$bypass_scrape_protection=true;
That line has to do with the scrape protection system that I implemented in the most recent version (see above). It was hurried out, so it still has flaws that I will fix. That line will disable it.
3. Check to make sure the www2.usfirst.org domain is online. They must be doing some upgrades or something, because it seems to be going down for short periods every few days, or at least it did when I was building this system. It got frustrating.
4. If it's still not working, add the following line to the top of the matchresults_config.php file:
PHP Code:
error_reporting(E_ERROR | E_WARNING | E_PARSE);
then use the system again. That will make PHP spit out any errors that might have occurred. If it's something about the max execution time (or time limit) being exceeded, then use:
PHP Code:
set_time_limit(60);
to set the max execution time to one minute instead of the default 30 seconds. This means that your server doesn't have a fast enough connection (unlikely) or enough processing power to handle four events in 30 seconds. If it gives an error about a memory limit, use the similar function:
PHP Code:
ini_set('memory_limit', '256M');
to increase the memory limit to an outrageous amount.
Normally, you'd use matchresults_viewrecord.php. When testing, try using matchresults_output_show.php. That is the most basic one - it won't use AJAX Refresh or even save to the cache, just get you your data.