Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Manual Upgrade Procedure. Rate Topic   - - - - -

 
  • baballuci
  • Senior Member
  • Members
  • Join Date: 02-Mar 06
  • 969 posts

Posted 11 October 2007 - 06:24 PM #1

After not being able to get store manager to work correctly, and with so many conflicts to resolve (modded skin) i decided to just upgrade my database manually to the new 1.3.5 format and do a fresh install of 1.3.5 and reskin my store from scratch. I've included a new database.sql file, the one in the 1.3.4 to 1.3.5 upgrade package as far as i can see is incorrect. I posted my findings here.

Please read through the post before comencing. the link to the files is at the bottom of this post.

This was done locally on XP using Xampp. I think the is a manual in file area explaining how to install cscart locally. This is quite long winded so bear with me:

1. Download and install 1.3.5 locally as per manual. Make sure this is working before proceeding.
2. Make a DB backup of live store, and copy file to desktop.
3. In PHPMYAdmin select the database you just installed 1.3.5 to, you'll see a list of all the tables in the right hand pane. Scroll down to the bottom of the list and click on "Check All", they should all turn pinkish, move to the box that says "With Selected" and select "Drop". You then see a box which says "Do You Really Want To?", scroll down and click "Yes". This will remove all the tables.
4. At the top of the page click on buttom "Import". At "File to Import" click on browse and select the DB Backup file from live store. Scroll down and click on "Go". After a few seconds you'll see a message syaing "Import has been successfully finished, ****** queries executed.".
5. Open the database.sql file from the manual_upgrade.zip into notepad. Goto Edit -> Select All -> Edit -> Copy.
6. Back in PHPMyAdmin, at the top of the page click SQL. You'll be presented with a box saying "Run SQl Query". Right click in the box and Paste. Scroll down and click on "Go". After a few seconds you should see a message saying "Your SQL query has been executed successfully", with 208 tables now in DB.
9. Copy the post_upgrade.php file to /xampp/htdocs/ (or where you installed 1.3.5).
9a. In web browser type http://localhost/post_upgrade.php, press enter. After a few seconds you sould see a couple of lines of writing with "ok Done" on the end.

1.3.5 should now be working locally with all you old cart settings and orders, ect...... If you didn't install the correct skin at the begining you may see a couple of parse errors. In admin goto skin selector and select the skin you want to use, this will clear this error. Now when you go to DB Backup, you can backup into 1.3.5 table format. On live site, just install 1.3.5 as normal, in admin goto DB Backup and restore this new file. Touch wood and fingers crossed this should be it.

Please make sure you have a backup of you live store before replacing it, I won't be held responsible for any losses.

The files are available for download here. The Lon and Lat fields i have left in the table cscart_countries, this is where the original database.sql file wanted to put them, i'm not sure if they should be in cscart_ip2nation_countries.

Good Luck.
Charlie

 
  • baballuci
  • Senior Member
  • Members
  • Join Date: 02-Mar 06
  • 969 posts

Posted 11 October 2007 - 06:35 PM #2

Make sure the store is working correctly before going live.
Charlie

 
  • coder
  • Senior Member
  • Members
  • Join Date: 19-Jun 07
  • 404 posts

Posted 11 October 2007 - 09:34 PM #3

4. At the top of the page click on buttom "Import". At "File to Import" click on browse and select the DB Backup file from live store. Scroll down and click on "Go". After a few seconds you'll see a message syaing "Import has been successfully finished, ****** queries executed.".


The key is that import will depend on the file size..... I have my backup 92MB and phpMyadmin won't import :(

Alternative? You keep the new 1.3.5 database.... place the backup from your live store in 1.3.5 in /var/backup/database folder.... then go in admin and select the DB and click restore? It should do the same drop and install of the tables?

Once done then do next steps?

CS-CART: version 4.8.1


 
  • baballuci
  • Senior Member
  • Members
  • Join Date: 02-Mar 06
  • 969 posts

Posted 11 October 2007 - 10:53 PM #4

Yeah it should be the same.
Charlie

 
  • jmonk
  • Junior Member
  • Members
  • Join Date: 17-Apr 07
  • 19 posts

Posted 13 October 2007 - 06:51 PM #5

Hi Charlie,

I was breaking my mind just triying to upgrade manually to 1.3.5 and when I was leaving everything and began again from scratch, I saw your manual upgrade...

I performed it and i can say 'you save me lot of time'...

Great!!!

thanks for that "big help"

----------
CS - 1.3.4 Sp3
now 1.3.5

 
  • abcphim
  • Member
  • Members
  • Join Date: 27-Jul 07
  • 30 posts

Posted 13 October 2007 - 07:56 PM #6

Hello, I have 1.3.4 and I backup my current site ...then I place this file in live store in 1.3.5 in /var/backup/database ... I tried to restore it and this is what happen after it was done.

Backtrace:
File: /home/jabcphim/public_html/admin.php
Line: 79
Function: include
File: /home/jabcphim/public_html/targets/database.php
Line: 35
Function: include
File: /home/jabcphim/public_html/include/admin/database.php
Line: 171
Function: db_query
File: /home/jabcphim/public_html/core/db_mysql.php
Line: 94
Function: db_debug_error

 
  • jmonk
  • Junior Member
  • Members
  • Join Date: 17-Apr 07
  • 19 posts

Posted 13 October 2007 - 09:49 PM #7

Hi again...

It was quicker to be happy :( , it seems on this new version, was added some new tables and modified name on previous existing tables...

doing the previous procedure, is going to work well, but looking more deeply, on version 1.3.4 there is a table called 'cscart_featured_products' and on newer version that table doesn't exist anymore...
doing previous procedure, we will restore from backup the table 'cscart_featured_products' and we will have some crazy behaviour under configuration and addons screens....

but, i think we can fix that, before restoring the previous backup deleting the that table or deleting featured producs page... let me check this...

will update as soon as I try it...
regards

-----
CS 1.3.4 Sp3
Apache
Linux

 
  • jobosales
  • Senior Member
  • Members
  • Join Date: 04-Nov 06
  • 3114 posts

Posted 13 October 2007 - 10:22 PM #8

You need to run post post_upgrade.php. This will move data about to the new structure and drod columns/tables that are no longer needed.

Bob
CS-Cart 2.0.14 (testing)

 
  • jmonk
  • Junior Member
  • Members
  • Join Date: 17-Apr 07
  • 19 posts

Posted 13 October 2007 - 11:27 PM #9

Hi Bob,

I know where the issue is...
the procedure is ok... and working properly for English language, I have also spanish and there are some issues at admin, configuration and addons screens...
I think it could be some language variables, but need to look it deeply ...

On english language, is working as expected.... but on spanish, got different strange behaviour on that screens...

For example,

this is the main on english language
see main_english.jpg
this is the same but on spanish language
see main_spanish.jpg

so need to verify what the problem is...

thanks in advance
regards

Attached Thumbnails

  • main_spanish.jpg
  • main_english.jpg


 
  • dhudson
  • Junior Member
  • Members
  • Join Date: 01-Oct 06
  • 26 posts

Posted 14 October 2007 - 07:09 PM #10

I'm trying your method and I got to the part where you install the skins and I'm getting this error message:

Error: skin description (the "manifest" file) was not found. Please check whether you have extracted all the files from the distribution package.

I checked and double check and I can see the file under the skin that I selected but I still get this message. I changed the permissions to 644, 755, 777 and I get the same message. I even re-installed the skin directory to the remote and the same message appears.

 
  • jmonk
  • Junior Member
  • Members
  • Join Date: 17-Apr 07
  • 19 posts

Posted 15 October 2007 - 04:11 PM #11

Hi Guys,

I'm getting concerned about manually upgrade or doing an upgrade through CS manager...
I did using both but results are different... I mean...

upgrading manually, using charlie's procedure, is going to work ok, and after executing post_upgrade.sql, you will have 204 tables on database...

but executing the upgrade through cs manager i got only 198 tables...

looking this post, http://forum.cs-cart...read.php?t=4377, it is a database schema that will show 204 tables...

what happens with rest of tables, does it mean on CS manager there are some tables left? do we need to create them manually?

thanks again..

jmonk
=====
CS 1.3.5
Ubuntu

 
  • jmonk
  • Junior Member
  • Members
  • Join Date: 17-Apr 07
  • 19 posts

Posted 15 October 2007 - 04:28 PM #12

I'm trying your method and I got to the part where you install the skins and I'm getting this error message:

Error: skin description (the "manifest" file) was not found. Please check whether you have extracted all the files from the distribution package.

I checked and double check and I can see the file under the skin that I selected but I still get this message. I changed the permissions to 644, 755, 777 and I get the same message. I even re-installed the skin directory to the remote and the same message appears.


Hi Dhudson,

doing a search on the forum about bad manifiest, i saw this post,
http://forum.cs-cart...hlight=manifest

so it seems reinstalling again the skin is going to fix your issue...
try it and let us know what happens :D

regards

 

Posted 15 October 2007 - 08:45 PM #13

looking this post, http://forum.cs-cart...read.php?t=4377, it is a database schema that will show 204 tables...

what happens with rest of tables, does it mean on CS manager there are some tables left? do we need to create them manually?

thanks again..

jmonk
=====
CS 1.3.5
Ubuntu


The manual upgrade is fool-proof. I've never used the store manager and have working stores for each upgrade. Issues that were present afterwards have always been system level bugs that cs-cart has needed to provide attention to, (not part of store manager)
I've moved on from CS-Cart to WooC******** - If you need anything I can be of little help.

 
  • jobosales
  • Senior Member
  • Members
  • Join Date: 04-Nov 06
  • 3114 posts

Posted 16 October 2007 - 12:25 AM #14

jmonk-

See my post here. This explains the discrepancies you noted between the two methods.

As JesseLeeStringer and others have noted, a manual upgrade is the most reliable method (make sure you are not upgrading a live store diectly), but you must use the official sources to achieve the expected (and supported) results.

Bob
CS-Cart 2.0.14 (testing)

 

Posted 18 October 2007 - 09:14 PM #15

Hello

What more can I say apart from a massive thank you for providing this lesson on upgrading the database.

Tried & Tested and it worked for me.

JesseLeeStringer you should pin this to the board !
Forget past mistakes. Forget failures. Forget everything except what you’re going to do now and do it



Now using CS-Cart 2.0.5

 

Posted 19 October 2007 - 02:08 AM #16

Pinned as Requested
I've moved on from CS-Cart to WooC******** - If you need anything I can be of little help.

 

Posted 19 October 2007 - 04:06 AM #17

Pinned as Requested



Good girl Jesse
Forget past mistakes. Forget failures. Forget everything except what you’re going to do now and do it



Now using CS-Cart 2.0.5

 

Posted 19 October 2007 - 04:31 AM #18

Good boy Jesse

no problem
I've moved on from CS-Cart to WooC******** - If you need anything I can be of little help.

 
  • MikeK
  • Senior Member
  • Members
  • Join Date: 26-Apr 06
  • 434 posts

Posted 19 October 2007 - 05:25 PM #19

I agree! Good BOY Jessie. ;)

 

Posted 19 October 2007 - 08:36 PM #20

I could not get baballuci's approach to work so I tried what smavtron suggested and thought it was going to work. Until I got to the last step. I "ran" post_upgrade.php and got the following error:

Start Status: Rebuilding related products.....................................................................................................................................................................................................................................................................................................................................................Status: Done Status: Rebuilding featured products....Status: Done Status: Rebuilding objects statuses information...

Database error: 1062 : Duplicate entry 'P-O' for key 1
Invalid query: INSERT INTO cscart_statuses (`status`, `type`) VALUES ('P', 'O');

Backtrace:
File: C:\Xammp\htdocs\nsp135\post_upgrade.php
Line: 142
Function: db_insert_by_array
File: C:\Xammp\htdocs\nsp135\core\fn_database.php
Line: 131
Function: db_query
File: C:\Xammp\htdocs\nsp135\core\db_mysql41.php
Line: 72
Function: db_debug_error


Anyone got any ideas for me?
Thanks,
j
**EDIT** if it matters this is all being done on my LOCAL testing server