Zen Cart Logo
Forums / General Questions / query_selects_xxxxx.log files in Cache folder

query_selects_xxxxx.log files in Cache folder

Views: 1,670

Results 1 to 11 of 11
12 May 2010, 5:10 AM
#1
ishikawa91 avatar

ishikawa91

New Zenner

Join Date:
Jan 2010
Posts:
9
Plugin Contributions:
0

query_selects_xxxxx.log files in Cache folder

Hello everyone. I seem to be having an odd issue. In my cache folder i have almost 40-45k files. They are under the name query_selects_1270683423.txt, the numbers are increasing with each file. And also query_selects_index_1264951893.txt
I have v1.3.9b. After deleting all of them, they just keep coming back. Do i have some logging thing enabled by mistake? Please help!

12 May 2010, 5:20 AM
#2
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,179
Plugin Contributions:
0

Re: query_selects_xxxxx.log files in Cache folder

Is,
Please post back the warning error please...

13 May 2010, 3:46 AM
#3
ishikawa91 avatar

ishikawa91

New Zenner

Join Date:
Jan 2010
Posts:
9
Plugin Contributions:
0

Re: query_selects_xxxxx.log files in Cache folder

Theres no error, but theres just a lot of files generating in the cache folder. My webhost has a cap of 50k files and the cache folder itself is 50k files lol.

13 May 2010, 4:42 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: query_selects_xxxxx.log files in Cache folder

Under Admin->Configuration->Logging->Store Database Queries ... set it to false if you want it to not record all the SQL queries the site generates. That should only be used for debugging purposes anyway.

14 May 2010, 2:24 AM
#5
ishikawa91 avatar

ishikawa91

New Zenner

Join Date:
Jan 2010
Posts:
9
Plugin Contributions:
0

Re: query_selects_xxxxx.log files in Cache folder

I disabled that with no luck. I still have the query_selects_xxxxx.txt files. They are not .log, but .txt. A new development today there are now:
query_selects_contact_us_xxxxxxxxxx.txt query_selects_account_newsletter_xxxxxxxxxx.txt
query_selects_advanced_search_xxxxxxxxxx.txt
query_selects_checkout_confirmation_xxxxxxxxxx.txt
query_selects_checkout_payment_xxxxxxxxxx.txt
query_selects_checkout_shipping_xxxxxxxxxx.txt
query_selects_conditions_xxxxxxxxxx.txt
query_selects_cookie_usage_xxxxxxxxxx.txt
query_selects_create_account_xxxxxxxxxx.txt
query_selects_contact_us_xxxxxxxxxx.txt
query_selects_discount_coupon_xxxxxxxxxx.txt
query_selects_creat_account_success_xxxxxxxxxx.txt
query_selects_down_for_maintenance_xxxxxxxxxx.txt
query_selects_gv_faqs_xxxxxxxxxx.txt
query_selects_index_xxxxxxxxxx.txt

14 May 2010, 5:58 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: query_selects_xxxxx.log files in Cache folder

What do the first 10 lines of your /includes/classes/db/mysql/query_factory.php say? Paste them here.

15 May 2010, 5:31 AM
#7
ishikawa91 avatar

ishikawa91

New Zenner

Join Date:
Jan 2010
Posts:
9
Plugin Contributions:
0

Re: query_selects_xxxxx.log files in Cache folder

<?php /** * MySQL query_factory Class. * Class used for database abstraction to MySQL * * @package classes * @copyright Copyright 2003-2007 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: query_factory.php 5741 2007-01-31 20:37:46Z wilt $ */ if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } /** * Queryfactory - A simple database abstraction layer * */ class queryFactory extends base { function queryFactory() { $this->count_queries = 0; $this->total_query_time = 0; $this->total_queries = 0; } If you need more, I can post it.
15 May 2010, 5:42 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: query_selects_xxxxx.log files in Cache folder

You said you had upgraded to v1.3.9b, but the code you have posted is NOT the v1.3.9b version of that file.
That's likely your problem.

21 May 2010, 3:14 AM
#9
ishikawa91 avatar

ishikawa91

New Zenner

Join Date:
Jan 2010
Posts:
9
Plugin Contributions:
0

Re: query_selects_xxxxx.log files in Cache folder

Yes, thats correct. I had a rollback and it undid my upgrade. I was not told about the rollback. but I upgraded to version c. and hopefully it will go away. Here is the code that you wanted to see:

<?php /** * MySQL query_factory Class. * Class used for database abstraction to MySQL * * @package classes * @copyright Copyright 2003-2007 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: query_factory.php 5741 2007-01-31 20:37:46Z wilt $ */ if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } /** * Queryfactory - A simple database abstraction layer * */ class queryFactory extends base { function queryFactory() { $this->count_queries = 0; $this->total_query_time = 0; $this->total_queries = 0; } function isProductsQuery($query) { // we have to be sure that's it's basic, one product query // no derived columns, no additional constraints in where clause etc. if(strncmp($query, "select", 6) === 0) { $anchor = "from " . TABLE_PRODUCTS . " where products_id ="; $from_pos = strpos($query, $anchor , 9); if( $from_pos > 0) { // only letters,commas and spaces between select and from $temp = substr($query, 7, $from_pos - 7); $matched = ereg("[ ,_a-z]*",$temp,$matches); if($matched === 1) return(false); // nothing, or only limit 1 after products_id ='' $temp = substr($query, $from_pos + strlen($anchor)); if(strlen($temp) > 0) { $res = ereg("^'[0-9]+' limit 1$",$temp); return($res !== 1); } return(true); } else return(false); } return(false); }
21 May 2010, 9:04 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: query_selects_xxxxx.log files in Cache folder

Once again, that is not the v1.3.9 version of that file. Hence the problem.

22 May 2010, 6:29 AM
#11
ishikawa91 avatar

ishikawa91

New Zenner

Join Date:
Jan 2010
Posts:
9
Plugin Contributions:
0

Re: query_selects_xxxxx.log files in Cache folder

Hmm, I think the problem may be that I auto-upgraded through my webhost. It may not have overwritten the files properly. Il try a fresh install I guess. I really appreciate the help