Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Upgrade your store

 
Reply
   X-Cart forums > General > General talk
 
Thread Tools
  #101  
Old 05-07-2008, 10:11 AM
  herbj's Avatar 
herbj herbj is offline
 

Advanced Member
  
Join Date: Feb 2007
Location: Florida
Posts: 62
 

Default Re: Upgrade your store

Quote:
Originally Posted by ncatanio
I've read this entire thread but I'm still not sure. is there a patch that can be implemented through the patch/upgrade function in the admin? And if so, where can I get that patch?

Kevin

Hi Kevin, First you should update your signature with your software version and any mods you may have.

The post does say where to get the patch but if you missed it you can get it from Qualiteam (x-cart) by requesting it.

Once the testing is complete the Guru's are supposed to post in here in this thread.
Hopefully by the end of this week.

And yes, it can be applied through the "Admin patch/upgrade" function.

Hope this helps....
Reply With Quote
  #102  
Old 05-07-2008, 10:21 AM
 
ncatanio ncatanio is offline
 

Newbie
  
Join Date: Jul 2004
Posts: 7
 

Default Re: Upgrade your store

Thanks. I've updated the signature. I'm running version 4.0.19 and getting the error 1054 code. I tried the patch/upgrade through the admin that I got from message #68. The test results are as follows. Can anyone interpret for me? There seems to be conflicting information.

Result of the testing phase...

Checking patch.pl permissions: /shared/volumes/userdata1/2/2970/site/htdocs/xcart/patch.pl ... OK

File Status
include/func.php already patched


Status legend:
OK - file ready to patch,
checksum error - patch contents is corrupted,
non-writable - please give those files a write permissions,
not a file - the target is not a file,
not exists - file is missing,
could not patch - patch cannot be applied to this file automatically because it was significantly modified, the patch for this file should be applied manually,
already patched - file was already patched.



Note:
Files which are not exists and already patched will be ignored.


I have not patched this file in the past. It was initially installed a year or two ago and has worked fine until now. Thoughts?

Kevin
__________________
Kevin: version: 4.0.19
Reply With Quote
  #103  
Old 05-07-2008, 10:44 AM
  herbj's Avatar 
herbj herbj is offline
 

Advanced Member
  
Join Date: Feb 2007
Location: Florida
Posts: 62
 

Default Re: Upgrade your store

When are you getting the "error 1054"?
And can you give more detail about the error?

If you are patching a file and it comes back with the "OK" and states "The file has already been patched" then the file has been patched at some point in time.

And you are patching through the "Apply patch" and NOT the "Apply SQL patch" since the mysql patch for mysql5.X is a php patch and not an SQL patch...
Reply With Quote
  #104  
Old 05-07-2008, 11:06 AM
 
ncatanio ncatanio is offline
 

Newbie
  
Join Date: Jul 2004
Posts: 7
 

Default Re: Upgrade your store

The 1054 error code is appearing in the SQL error message email sent by the site.

Request URI : /xcart/home.php?cat=3
Remote IP : 69.234.215.163
Logged as :
SQL query : SELECT COUNT(xcart_products.productid), MIN(xcart_pricing.price) as price , xcart_products_lng.product as product_lng, xcart_products_lng.descr as descr_lng, xcart_products_lng.full_descr as fulldescr_lng, IF(xcart_variants.variantid IS NOT NULL,'Y','') as is_variant, IF(xcart_classes.classid IS NOT NULL,'Y','') as is_product_options, MIN(v_pricing.price) as v_price FROM xcart_products, xcart_pricing , xcart_products_categories, xcart_categories LEFT JOIN xcart_products_lng ON xcart_products_lng.productid = xcart_products.productid AND xcart_products_lng.code = 'US' LEFT JOIN xcart_classes ON xcart_classes.productid = xcart_products.productid LEFT JOIN xcart_variants ON xcart_variants.productid = xcart_products.productid LEFT JOIN xcart_pricing as v_pricing ON v_pricing.variantid = xcart_variants.variantid AND v_pricing.quantity = 1 AND v_pricing.membership IN ('','') WHERE xcart_pricing.productid=xcart_products.productid AND xcart_pricing.quantity=1 AND xcart_pricing.membership IN ('','') AND xcart_products.product_type <> 'C' AND xcart_products.forsale <> 'B' AND xcart_pricing.variantid = 0 AND xcart_products_categories.productid=xcart_products .productid AND xcart_products_categories.categoryid = xcart_categories.categoryid AND xcart_categories.membership IN ('','') AND xcart_categories.avail = 'Y' AND xcart_products_categories.categoryid='3' AND (xcart_products_categories.main='Y' OR xcart_products_categories.main!='Y') AND xcart_products.forsale='Y' GROUP BY xcart_products.productid
Error code : 1054
Description :

Unknown column 'xcart_products.productid' in 'on clause'
Backtrace :
/shared/volumes/userdata1/2/2970/site/htdocs/xcart/include/func.php:121
/shared/volumes/userdata1/2/2970/site/htdocs/xcart/include/func.php:80
/shared/volumes/userdata1/2/2970/site/htdocs/xcart/include/search.php:499
/shared/volumes/userdata1/2/2970/site/htdocs/xcart/products.php:76
/shared/volumes/userdata1/2/2970/site/htdocs/xcart/home.php:49

The code that appears on the top of the pages on the public side is as follows:

INVALID SQL: 0 :
SQL QUERY FAILURE: SELECT COUNT(xcart_products.productid), MIN(xcart_pricing.price) as price , xcart_products_lng.product as product_lng, xcart_products_lng.descr as descr_lng, xcart_products_lng.full_descr as fulldescr_lng, IF(xcart_variants.variantid IS NOT NULL,'Y','') as is_variant, IF(xcart_classes.classid IS NOT NULL,'Y','') as is_product_options, MIN(v_pricing.price) as v_price FROM xcart_products, xcart_pricing , xcart_featured_products, xcart_products_categories, xcart_categories LEFT JOIN xcart_products_lng ON xcart_products_lng.productid = xcart_products.productid AND xcart_products_lng.code = 'US' LEFT JOIN xcart_classes ON xcart_classes.productid = xcart_products.productid LEFT JOIN xcart_variants ON xcart_variants.productid = xcart_products.productid LEFT JOIN xcart_pricing as v_pricing ON v_pricing.variantid = xcart_variants.variantid AND v_pricing.quantity = 1 AND v_pricing.membership IN ('','') WHERE xcart_products.productid=xcart_featured_products.p roductid AND xcart_featured_products.avail='Y' AND xcart_featured_products.categoryid='3' AND xcart_pricing.productid=xcart_products.productid AND xcart_pricing.quantity=1 AND xcart_pricing.membership IN ('','') AND xcart_products.product_type <> 'C' AND xcart_products.forsale <> 'B' AND xcart_pricing.variantid = 0 AND xcart_products_categories.productid=xcart_products .productid AND xcart_products_categories.categoryid = xcart_categories.categoryid AND xcart_categories.membership IN ('','') AND xcart_categories.avail = 'Y' AND xcart_products.forsale='Y' GROUP BY xcart_products.productid

I attempted to apply the patch in the admin under "Apply Patch" not "Apply sql patch."

Thoughts?
__________________
Kevin: version: 4.0.19
Reply With Quote
  #105  
Old 05-07-2008, 11:37 AM
  herbj's Avatar 
herbj herbj is offline
 

Advanced Member
  
Join Date: Feb 2007
Location: Florida
Posts: 62
 

Default Re: Upgrade your store

Has your Hosting Company made the change to "MYSQL5.X" ?
Reply With Quote
  #106  
Old 05-07-2008, 11:48 AM
 
ncatanio ncatanio is offline
 

Newbie
  
Join Date: Jul 2004
Posts: 7
 

Default Re: Upgrade your store

It's appears to be fixed now. Diab303 had this solution. It worked great for me and takes no time at all. Thanks Diab.

Kevin



diab303
--------------------------------------------------------------------------------

Way to make xcart 4.0.x compatible with mysql5

--------------------------------------------------------------------------------

I've found a quick and dirty solution instead of patching all queries.

in include/func.php patch db_query() as follows (4 lines of code)


Code:
...
function db_query($query) {

# mysql5 fix-up
if (preg_match('/SELECT .* FROM .* LEFT JOIN/',$query)) {
$query = preg_replace('/ FROM /',' FROM ( ',$query);
$query = preg_replace('/ LEFT JOIN /',' ) LEFT JOIN ',$query,1);
}
# mysql5 fix-up END

global $debug_mode;
global $mysql_autorepair;
...
good luck,

--
diab
__________________
Kevin: version: 4.0.19
Reply With Quote
  #107  
Old 05-07-2008, 11:50 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Upgrade your store

I would suggest using the patch posted in this thread and NOT that hack.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #108  
Old 05-10-2008, 10:41 AM
 
josebueso josebueso is offline
 

eXpert
  
Join Date: Apr 2006
Location: USA
Posts: 371
 

Default Re: Upgrade your store

Hi

I tried to patch but I get the error include/func.php not found I look into the include folder but func.php is not there. my version is 4.1.9.

Can some help? Is this patch for 4.1.9

INVALID SQL: 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 'where productcode='16652' and productid='16652'' at line 1

SQL QUERY FAILURE:select count(*) from where productcode='16652' and productid='16652'


Thank you

Jose
__________________
Saul
x-cart 4.7.9 Gold Plus

www.uncionmusic.com
Reply With Quote
  #109  
Old 05-10-2008, 11:25 AM
  herbj's Avatar 
herbj herbj is offline
 

Advanced Member
  
Join Date: Feb 2007
Location: Florida
Posts: 62
 

Default Re: Upgrade your store

Quote:
Originally Posted by josebueso
Hi

I tried to patch but I get the error include/func.php not found I look into the include folder but func.php is not there. my version is 4.1.9.

Can some help? Is this patch for 4.1.9

INVALID SQL: 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 'where productcode='16652' and productid='16652'' at line 1

SQL QUERY FAILURE:select count(*) from where productcode='16652' and productid='16652'


Thank you

Jose

Jose, always read the entire thread before trying a patch!

This patch is for the 4.0.X branch.

The 4.1.X branch does not need the patch posted in this thread!!!!
Reply With Quote
  #110  
Old 05-10-2008, 09:04 PM
 
youngvet1 youngvet1 is offline
 

eXpert
  
Join Date: Aug 2005
Posts: 245
 

Default Re: Upgrade your store

Quote:
Originally Posted by intel352
The check for the server version happens once (and this patch will be installed on stores not yet running MySQL 5, so the check needs to be there). That's not the issue.

The issue is that there is regex matching that checks every query as it is executed. If it finds a query with a LEFT JOIN statement, it then slightly rewrites that query (using another regex statement).


I am very interested in this patch but am very concerned regarding performance.

Rather than doing using a REGEX statement to check for Left join and doing this every time a page loads it would be great if someone could come up with a script that goes through all the files on the persons server and does the replace once and for all. Then there will be zero performance hit.

Or perhaps a list of files and instructions so we can just paste them in a text file and go through the files one by one and just do a search in the text file for the Join and replace each one individually this way their will be no need for the REGEX statement every time and perhaps multiple times depending on the page.
__________________
x-cart version 4.0.14
Reply With Quote
Reply
   X-Cart forums > General > General talk


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:21 PM.

   

 
X-Cart forums © 2001-2020