Page 1 of 1

Cache ranking

Posted: Sun Feb 16, 2014 11:56 pm
by TermiteHunter
There is an error in the cache ranking section of the statistics link. no results are given.

octeam@opencaching.us sql_error: http://www.opencaching.us/ 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(`type`=1 OR `type`=7) AND `cache_logs`.`deleted`=0 GROUP BY `caches`.' at line 6 -------------------- Array ( [0] => Array ( [file] => /var/www/oc/lib/clicompatbase.inc.php [line] => 387 [function] => sql_error [args] => Array ( ) ) [1] => Array ( [file] => /var/www/oc/lib/top.php [line] => 37 [function] => sql [args] => Array ( [0] => CREATE TEMPORARY TABLE topFounds (`cache_id` INT(11) PRIMARY KEY, `founds` INT(11)) SELECT `caches`.`cache_id`, COUNT(`cache_logs`.`cache_id`) `founds` FROM `caches` LEFT JOIN `cache_logs` ON `caches`.`cache_id`=`cache_logs`.`cache_id` AND `cache_logs`.(`type`=1 OR `type`=7) AND `cache_logs`.`deleted`=0 GROUP BY `caches`.`cache_id` ) ) [2] => Array ( [file] => /var/www/oc/lib/common.inc.php(624) : eval()'d code [line] => 278 [args] => Array ( [0] => /var/www/oc/lib/top.php ) [function] => include ) [3] => Array ( [file] => /var/www/oc/lib/common.inc.php [line] => 624 [function] => eval ) [4] => Array ( [file] => /var/www/oc/articles.php [line] => 81 [function] => tpl_BuildTemplate [args] => Array ( ) ) )

Re: Cache ranking

Posted: Mon Feb 17, 2014 2:47 pm
by Mr.Yuck
TermiteHunter wrote:There is an error in the cache ranking section of the statistics link. no results are given.

octeam@opencaching.us sql_error: http://www.opencaching.us/ 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(`type`=1 OR `type`=7) AND `cache_logs`.`deleted`=0 GROUP BY `caches`.' at line 6 -------------------- Array ( [0] => Array ( [file] => /var/www/oc/lib/clicompatbase.inc.php [line] => 387 [function] => sql_error [args] => Array ( ) ) [1] => Array ( [file] => /var/www/oc/lib/top.php [line] => 37 [function] => sql [args] => Array ( [0] => CREATE TEMPORARY TABLE topFounds (`cache_id` INT(11) PRIMARY KEY, `founds` INT(11)) SELECT `caches`.`cache_id`, COUNT(`cache_logs`.`cache_id`) `founds` FROM `caches` LEFT JOIN `cache_logs` ON `caches`.`cache_id`=`cache_logs`.`cache_id` AND `cache_logs`.(`type`=1 OR `type`=7) AND `cache_logs`.`deleted`=0 GROUP BY `caches`.`cache_id` ) ) [2] => Array ( [file] => /var/www/oc/lib/common.inc.php(624) : eval()'d code [line] => 278 [args] => Array ( [0] => /var/www/oc/lib/top.php ) [function] => include ) [3] => Array ( [file] => /var/www/oc/lib/common.inc.php [line] => 624 [function] => eval ) [4] => Array ( [file] => /var/www/oc/articles.php [line] => 81 [function] => tpl_BuildTemplate [args] => Array ( ) ) )
Hmm. That is one messed up page. I'm quite certain I did NOT touch that while making events count as finds. It's probably been messed up for ages, I can't remember EVER looking at that page, having joined on day one in 2010. This *SHOULD* be as easy as contacting Paul from OpenCaching.org.uk, and asking for his copy of that file, as his seems to work fine: http://www.opencaching.org.uk/articles.php?page=s5

Re: Cache ranking

Posted: Mon Feb 17, 2014 4:55 pm
by TermiteHunter
I used to check it regularly but have not looked in recent months

Sent from the brewery

Re: Cache ranking

Posted: Tue Feb 18, 2014 9:58 am
by Mr.Yuck
TermiteHunter wrote:There is an error in the cache ranking section of the statistics link. no results are given.

octeam@opencaching.us sql_error: http://www.opencaching.us/ 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(`type`=1 OR `type`=7) AND `cache_logs`.`deleted`=0 GROUP BY `caches`.' at line 6 -------------------- Array ( [0] => Array ( [file] => /var/www/oc/lib/clicompatbase.inc.php [line] => 387 [function] => sql_error [args] => Array ( ) ) [1] => Array ( [file] => /var/www/oc/lib/top.php [line] => 37 [function] => sql [args] => Array ( [0] => CREATE TEMPORARY TABLE topFounds (`cache_id` INT(11) PRIMARY KEY, `founds` INT(11)) SELECT `caches`.`cache_id`, COUNT(`cache_logs`.`cache_id`) `founds` FROM `caches` LEFT JOIN `cache_logs` ON `caches`.`cache_id`=`cache_logs`.`cache_id` AND `cache_logs`.(`type`=1 OR `type`=7) AND `cache_logs`.`deleted`=0 GROUP BY `caches`.`cache_id` ) ) [2] => Array ( [file] => /var/www/oc/lib/common.inc.php(624) : eval()'d code [line] => 278 [args] => Array ( [0] => /var/www/oc/lib/top.php ) [function] => include ) [3] => Array ( [file] => /var/www/oc/lib/common.inc.php [line] => 624 [function] => eval ) [4] => Array ( [file] => /var/www/oc/articles.php [line] => 81 [function] => tpl_BuildTemplate [args] => Array ( ) ) )
You know what? I did break this while making events count as finds. See what I bolded in the gibberish? That's how I did it, I had to add type=7 (which is events, found it's are type 1) in the code in many files. I do have a test server, which is a January 12th image of the website, but it was broken there too (it took several weeks of casual tinkering before the "announcement" that events count as finds). That page is NOT crawled by archive.org, as it's a page people can only see while logged in, and archive.org obviously doesn't log in.

The gibberish does appear to tell me where the errors are, but I'm going to have to study that carefully. We'll have to add it to "the list". Speaking of which, I finally got VERIZON to fix my issue with the gibberish emails, and it was on their end. I'll bet you don't want to hear this, but it appears I will have to work with individual ISP's on gibberish emails. I did have contact with Roadrunner, but they abruptly stopped answering me months ago. I'll have to try again. :mrgreen:

EDIT: Once posted, you can barely tell what I bolded, but that's the problem, allright.

Re: Cache ranking

Posted: Tue Feb 18, 2014 1:01 pm
by Mr.Yuck
In the future, I should do less talking, and more doing. Once I looked into this, I had it fixed in about 6 minutes flat. Actually, this thread is now the only reference to what all the gibberish text was, as the page is fixed, and it's all gone. I simply had to remove the type 7 (events) reference in /var/www/oc/lib/top.php which I did indeed change on January 14th.

You're No. 2 on the cache ranking list, TH!! :mrgreen:

Re: Cache ranking

Posted: Tue Feb 18, 2014 4:27 pm
by DudleyGrunt
Thanks, Jim!

Re: Cache ranking

Posted: Tue Feb 18, 2014 6:48 pm
by Mr.Yuck
DudleyGrunt wrote:Thanks, Jim!
It just occured to me I'd better check the numbers, and after picking the top two, and about 5 others at random (a lot were ties too), I'm confident that page is good to go. If that's all that got broken, I'll take it. :P

Re: Cache ranking

Posted: Tue Feb 18, 2014 10:00 pm
by TermiteHunter
Mr.Yuck wrote:
You're No. 2 on the cache ranking list, TH!! :mrgreen:
That's one reason I kept an eye on these stats along with all the rest

Sent from the brewery