Difference between revisions of "X-Cart:Applying Upgrade Packs and Database Upgrade Scripts"

From X-Cart 4 Classic
Jump to: navigation, search
(Created page with '==Applying in-branch upgrade packs== To apply an upgrade pack: ===Branch 3.5.x=== 1. Obtain an upgrade pack for your version of X-Cart as described in the section [[X-Cart:Upg…')
 
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
==Applying in-branch upgrade packs==
+
{{Note1| <b>NEED HELP?</b> Feel free to contact our support team via your personal [https://secure.qtmsoft.com Help Desk accounts] should you require any help in upgrading your X-Cart store to the latest version.}}
  
To apply an upgrade pack:
+
==Applying upgrade packs==
  
===Branch 3.5.x===
+
To apply an upgrade pack to your X-Cart installation:
 +
# Place the files of your upgrade pack in the X-Cart root directory on your server or hosting account.
 +
#* ''If you use a Windows-based server, or a UNIX-based server without terminal access:''<br />Decompress the upgrade pack archive to a directory on your system using your favorite compression program (WinZIP or any other archiver with support for TAR files).<br />Use an FTP client to upload all the files of the decompressed archive (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
 +
#* ''If you use a UNIX-based server with terminal access:''<br />Use an FTP client to upload the upgrade pack archive to the X-Cart root directory on your server or your hosting account.<br />Decompress the archive using the following command:<br /><pre>tar -xzvf <archive_filename></pre>
 +
# Make sure that the files that will be patched during the upgrade have world writable permissions. Names of the files to be patched are listed in the file <xcart_dir>/upgrade/[source-version]-[target-version]/file.lst.<br />If you use a UNIX-based server, to set world writable permissions to the required files you can run the following shell command:<br /><pre>for i in `sed -e 's/,.*$//g' < upgrade/[source-version]-[target-version]/file.lst`; do chmod 666 $i ; done</pre>replacing the [source-version] and [target-version] parts with the source and target versions of the X-Cart installation that you upgrade.{{Note1|Important! The command must be run from the X-Cart root directory.}}
 +
# Log in to the X-Cart Admin area.
 +
# Go to the '<u>Patch/Upgrade Center</u>' page (Tools menu -> Patch/Upgrade. Before X-Cart 4.4.x: Administration menu -> Patch/Upgrade).
 +
# In the 'Upgrade' section of the '<u>Patch/Upgrade Center</u>' page, use the '<u>Target version</u>' drop-down box to select the version to which you are going to upgrade your store (This corresponds to the upgrade pack you have uploaded). Also, in the 'I confirm that:' list, select all the checkboxes that apply. Click the '''Apply''' button.<br />X-Cart will test whether the files that need to be patched by the upgrade pack can be patched successfully and will list the respective files showing their status. The file status definitions are as follows:<br />
 +
#* OK - File can be patched successfully.
 +
#* Checksum error - Patch is corrupted. Try to download the patch again.
 +
#* Non-writable - File does not have write permissions. Set write permissions on the file.
 +
#* Not a file - Target is not a file. The original X-Cart structure has been modified and you need to apply the patch manually.
 +
#* Not exists - File is missing. The original X-Cart structure has been modified and you need to apply the patch manually.
 +
#* Could not patch - Patch cannot be applied to the file automatically, as the original X-Cart structure has been modified, and you need to apply the patch manually.
 +
#* Already patched - File has been patched already.<br />If your Patch/Upgrade center detects any problems (errors - marked in red), you will not be able to proceed with upgrading your X-Cart based store until these problems are resolved. You will have to go back, make the necessary corrections and run the upgrade pack applicability test once again.<br />As soon as the applicability test has been passed successfully, you can continue with the upgrade pack application.
 +
# Click the '''Apply patch''' button at the bottom of the page.<br>X-Cart will start patching the files. After the upgrade pack has been applied, X-Cart will display the list of patched files and a detailed report about the changes that have been made.
 +
# Click the '''Finish''' button at the bottom of the page to complete the upgrade pack application.
  
1. Obtain an upgrade pack for your version of X-Cart as described in the section [[X-Cart:Upgrading_the_store#Obtaining_upgrade_packs | Obtaining Upgrade Packs]].
+
==Applying database upgrade scripts==
  
Make sure the pack is intended for the source and target versions of your X-Cart installation.
+
To apply a database upgrade script:
  
2. Put the upgrade pack to the X-Cart root directory on your server or hosting account.
+
# Place the database upgrade script in the X-Cart root directory on your server or hosting account.<br />
 +
#* ''If you use a Windows-based server, or a UNIX-based server without terminal access:''<br />Decompress the database upgrade archive to a directory on your system using your favorite compression program (WinZIP or any other archiver with support for TAR files).<br />Use an FTP client to upload all the files from the decompressed archive (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
 +
#* ''If you use a UNIX-based server with terminal access:''<br />Use an FTP client to upload the database upgrade archive to the X-Cart root directory on your server or your hosting account.<br />Decompress the archive using the following command:<br /><pre>tar -xzvf <archive_filename></pre>
 +
# In a web browser, run the upgrade script <xcart_dir>/upgrade_sql.php replacing the <xcart_dir> part with the actual URL of your X-Cart installation. For example,
 +
<nowiki>http://www.example.com/xcart/upgrade_sql.php</nowiki> .<br />
 +
# Read the X-Cart License Agreement and click the '''Proceed with Upgrade''' button.<br />The script will display the progress of the upgrade procedure and finally report the results.
  
* If you use a Windows-based server, or a UNIX-based server without terminal access:
+
==Troubleshooting==
** Decompress the archive with the upgrade pack to a directory on your system using your favorite compression program (WinZIP or any other archiver with support for TAR files).
 
** Use an FTP client to upload all the files contained in the archive (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
 
  
* If you use a UNIX-based server with terminal access:
+
===Checksum errors during upgrade===
** Use an FTP client to upload the archive with the upgrade pack to the X-Cart root directory on your server or your hosting account.
 
** Decompress the package using the following commands.
 
  
<pre>tar -xzvf <archive_filename>
+
Checksum errors during upgrade are typically the result of corruption of the upgrade pack files either by the archiver program that was used to extract the upgrade archive or by the FTP client that was used to upload the upgrade pack files to the server.
</pre>
 
  
3. Make sure that the files that will be patched during the upgrade have world writable permissions. Names of the files to be patched are listed in the file <xcart_dir>/upgrade/[source-version]-[target-version]/file.lst.
+
If the upgrade pack files were extracted from the archive using WinZip, and now you are getting checksum errors, check your WinZip configuration to see if it is causing the problem: click <u>Options</u>, then <u>Configuration</u>, then select the <u>Miscellaneous</u> tab. The option <b>'TAR file smart CR/LF conversion'</b> must be turned off. If it is not, clear this option and extract the files from the archive once again.
  
If you use a UNIX-based server, to set world writable permissions to the required files you can run the following shell command
+
Also, ensure that your FTP client is set to transfer data in <b>'Binary'</b> mode. If, instead of the <b>'Binary'</b> mode, your FTP client is using the <b>'ASCII'/'Text'</b> mode, the files of your upgrade pack may end up being corrupted due to the incorrect translation of line break character codes between Windows and Unix systems. Although the changes are not visible, the test performed by X-Cart returns checksum values that do not match the checksums of the original files; thus, you get checksum errors. To resolve this problem, you should set your FTP client to the <b>'Binary'</b> mode and upload the upgrade pack files to the server again.
  
<pre>for i in `sed -e 's/,.*$//g' < upgrade/[source]-[target]/file.lst`; do chmod 666 $i ; done</pre>
+
[[Category:X-Cart user manual]]
 
 
replacing the [source] and [target] parts with the source and target versions of the X-Cart installation that you upgrade.
 
 
 
{{Note1|Important! You must run the command from the X-Cart root directory.}}
 
 
 
4. Log in to the X-Cart Admin area.
 
 
 
5. Go to the section Patch/Upgrade Center (Administration menu -> Patch/Upgrade).
 
 
 
You will see the Upgrade box.
 
 
 
6. Select the target version from the drop-down box and click the Apply button.
 
 
 
X-Cart will test whether the required files can be patched successfully and list the files showing their status. The file statuses mean as follows:
 
 
 
* OK - File can be patched successfully.
 
* Checksum error - Patch is corrupted. Try to download the patch again.
 
* Non-writable - File does not have writable permissions. Set up writable permissions to the file.
 
* Not a file - Target is not a file. The original X-Cart structure has been modified and you need to apply the patch manually.
 
* Not exists - File is missing. The original X-Cart structure has been modified and you need to apply the patch manually.
 
* Could not patch - Patch cannot be applied to the file automatically as the original X-Cart structure has been modified and you need to apply the patch manually.
 
* Already patched - File has been patched already.
 
 
 
7. Click the '''Apply patch''' button at the bottom of the page.
 
 
 
X-Cart will start patching the files. When the patch is applied, X-Cart will display the list of patched files and a detailed report about what changes has been made.
 
 
 
8. Click the '''Finish''' button at the bottom of the page.
 
 
 
 
 
 
 
===Branch 4.0.x===
 
 
 
1. Obtain an upgrade pack for your version of X-Cart as described in the section Obtaining Upgrade Packs earlier in this chapter.
 
 
 
Make sure the pack is intended for the source and target versions of your X-Cart installation.
 
 
 
2. Put the upgrade pack to the X-Cart root directory on your server or hosting account.
 
 
 
* If you use a Windows-based server, or a UNIX-based server without terminal access:
 
** Decompress the archive with the upgrade pack to a directory on your system using your favorite compression program (WinZIP or any other archiver with support for TAR files).
 
** Use an FTP client to upload all the files contained in the archive (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
 
 
 
* If you use a UNIX-based server with terminal access:
 
** Use an FTP client to upload the archive with the upgrade pack to the X-Cart root directory on your server or your hosting account.
 
** Decompress the package using the following commands.
 
 
 
<pre>tar -xzvf <archive_filename></pre>
 
 
 
3. Make sure that the files that will be patched during the upgrade have world writable permissions. Names of the files to be patched are listed in the file <xcart_dir>/upgrade/[source-version]-[target-version]/file.lst.
 
 
 
If you use a UNIX-based server, to set world writable permissions to the required files you can run the following shell command
 
 
 
<pre>for i in `sed -e 's/,.*$//g' < upgrade/[source]-[target]/file.lst`; do chmod 666 $i ; done</pre>
 
 
 
replacing the [source] and [target] parts with the source and target versions of the X-Cart installation that you upgrade.
 
 
 
{{Note1|Important! You must run the command from the X-Cart root directory.}}
 
 
 
4. Log in to the X-Cart Admin area.
 
 
 
5. Go to the section Patch/Upgrade Center (Administration menu -> Patch/Upgrade).
 
 
 
You will see the Upgrade box.
 
 
 
6. Select the target version from the drop-down box and click the Apply button.
 
 
 
X-Cart will test whether the required files can be patched successfully and list the files showing their status. The file statuses mean as follows:
 
 
 
* OK - File can be patched successfully.
 
* Checksum error - Patch is corrupted. Try to download the patch again.
 
* Non-writable - File does not have writable permissions. Set up writable permissions to the file.
 
* Not a file - Target is not a file. The original X-Cart structure has been modified and you need to apply the patch manually.
 
* Not exists - File is missing. The original X-Cart structure has been modified and you need to apply the patch manually.
 
* Could not patch - Patch cannot be applied to the file automatically as the original X-Cart structure has been modified and you need to apply the patch manually.
 
* Already patched - File has been patched already.
 
 
 
7. Click the '''Apply patch''' button at the bottom of the page.
 
 
 
X-Cart will start patching the files. When the patch is applied, X-Cart will display the list of patched files and a detailed report about what changes has been made.
 
 
 
8. Click the '''Finish''' button at the bottom of the page.
 
 
 
 
 
 
 
===Branch 4.1.x===
 
 
 
1. Obtain an upgrade pack for your version of X-Cart as described in the section Obtaining Upgrade Packs earlier in this chapter.
 
 
 
Make sure the pack is intended for the source and target versions of your X-Cart installation.
 
 
 
2. Put the upgrade pack to the X-Cart root directory on your server or hosting account.
 
 
 
* If you use a Windows-based server, or a UNIX-based server without terminal access:
 
** Decompress the archive with the upgrade pack to a directory on your system using your favorite compression program (WinZIP or any other archiver with support for TAR files).
 
** Use an FTP client to upload all the files contained in the archive (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
 
 
 
* If you use a UNIX-based server with terminal access:
 
** Use an FTP client to upload the archive with the upgrade pack to the X-Cart root directory on your server or your hosting account.
 
** Decompress the package using the following commands.
 
 
 
<pre>tar -xzvf <archive_filename></pre>
 
 
 
3. Make sure that the files that will be patched during the upgrade have world writable permissions. Names of the files to be patched are listed in the file <xcart_dir>/upgrade/[source-version]-[target-version]/file.lst.
 
 
 
If you use a UNIX-based server, to set world writable permissions to the required files you can run the following shell command
 
 
 
<pre>for i in `sed -e 's/,.*$//g' < upgrade/[source]-[target]/file.lst`; do chmod 666 $i ; done</pre>
 
 
 
replacing the [source] and [target] parts with the source and target versions of the X-Cart installation that you upgrade.
 
{{Note1|Important! You must run the command from the X-Cart root directory.}}
 
 
 
4. Log in to the X-Cart Admin area.
 
 
 
5. Go to the section Patch/Upgrade Center (Administration menu -> Patch/Upgrade).
 
 
 
You will see the Upgrade box.
 
 
 
6. Select the target version from the drop-down box and click the Apply button.
 
 
 
X-Cart will test whether the required files can be patched successfully and list the files showing their status. The file statuses mean as follows:
 
 
 
* OK - File can be patched successfully.
 
* Checksum error - Patch is corrupted. Try to download the patch again.
 
* Non-writable - File does not have writable permissions. Set up writable permissions to the file.
 
* Not a file - Target is not a file. The original X-Cart structure has been modified and you need to apply the patch manually.
 
* Not exists - File is missing. The original X-Cart structure has been modified and you need to apply the patch manually.
 
* Could not patch - Patch cannot be applied to the file automatically as the original X-Cart structure has been modified and you need to apply the patch manually.
 
* Already patched - File has been patched already.
 
 
 
7. Click the '''Apply patch''' button at the bottom of the page.
 
 
 
X-Cart will start patching the files. When the patch is applied, X-Cart will display the list of patched files and a detailed report about what changes has been made.
 
 
 
8. Click the '''Finish''' button at the bottom of the page.
 
 
 
 
 
 
 
===Branch 4.2.x===
 
 
 
1. Obtain an upgrade pack for your version of X-Cart as described in the section Obtaining Upgrade Packs earlier in this chapter.
 
 
 
Make sure the pack is intended for the source and target versions of your X-Cart installation.
 
 
 
2. Put the upgrade pack to the X-Cart root directory on your server or hosting account.
 
 
 
* If you use a Windows-based server, or a UNIX-based server without terminal access:
 
** Decompress the archive with the upgrade pack to a directory on your system using your favorite compression program (WinZIP or any other archiver with support for TAR files).
 
** Use an FTP client to upload all the files contained in the archive (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
 
 
 
* If you use a UNIX-based server with terminal access:
 
** Use an FTP client to upload the archive with the upgrade pack to the X-Cart root directory on your server or your hosting account.
 
** Decompress the package using the following commands.
 
 
 
<pre>tar -xzvf <archive_filename>
 
</pre>
 
 
 
3. Make sure that the files that will be patched during the upgrade have world writable permissions. Names of the files to be patched are listed in the file <xcart_dir>/upgrade/[source-version]-[target-version]/file.lst.
 
 
 
If you use a UNIX-based server, to set world writable permissions to the required files you can run the following shell command
 
 
 
<pre>for i in `sed -e 's/,.*$//g' < upgrade/[source]-[target]/file.lst`; do chmod 666 $i ; done</pre>
 
 
 
replacing the [source] and [target] parts with the source and target versions of the X-Cart installation that you upgrade.
 
 
 
{{Note1|Important! You must run the command from the X-Cart root directory.}}
 
 
 
4. Log in to the X-Cart Admin area.
 
 
 
5. Go to the section Patch/Upgrade Center (Administration menu -> Patch/Upgrade).
 
 
 
You will see the Upgrade box.
 
 
 
6. Select the target version from the drop-down box, select all the check boxes above and click the Apply button.
 
 
 
X-Cart will test whether the required files can be patched successfully and list the files showing their status. The file statuses mean as follows:
 
 
 
* OK - File can be patched successfully.
 
* Checksum error - Patch is corrupted. Try to download the patch again.
 
* Non-writable - File does not have writable permissions. Set up writable permissions to the file.
 
* Not a file - Target is not a file. The original X-Cart structure has been modified and you need to apply the patch manually.
 
* Not exists - File is missing. The original X-Cart structure has been modified and you need to apply the patch manually.
 
* Could not patch - Patch cannot be applied to the file automatically as the original X-Cart structure has been modified and you need to apply the patch manually.
 
* Already patched - File has been patched already.
 
 
 
7. Click the '''Apply patch''' button at the bottom of the page.
 
 
 
X-Cart will start patching the files. When the patch is applied, X-Cart will display the list of patched files and a detailed report about what changes has been made.
 
 
 
8. Click the '''Finish''' button at the bottom of the page.
 
 
 
 
 
 
 
==Applying database upgrade packs==
 
 
 
To upgrade the database:
 
 
 
===Branch 3.5.x to branch 4.1.x===
 
 
 
1. Make sure the current version of your X-Cart installation can be upgraded to the target version directly.
 
 
 
Consult the chart in the opening section of the chapter Upgrading X-Cart. If there is no a direct upgrade pack, you will need to upgrade to the required version through several transitional steps (upgrades).
 
 
 
2. Obtain the database upgrade pack as described in the section Obtaining Upgrade Packs earlier in this chapter.
 
3. Put the upgrade pack to the X-Cart root directory on your server or hosting account.
 
 
 
* If you use a Windows-based server, or a UNIX-based server without terminal access:
 
** Decompress the archive with the upgrade pack to a directory on your system using your favorite compression program (WinZIP or any other archiver with support for TAR files).
 
** Use an FTP client to upload all the files contained in the archive (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
 
 
 
* If you use a UNIX-based server with terminal access:
 
** Use an FTP client to upload the archive with the upgrade pack to the X-Cart root directory on your server or your hosting account.
 
** Decompress the package using the following commands.
 
 
 
<pre>tar -xzvf <archive_filename>
 
</pre>
 
 
 
4. In a web browser, run the upgrade script <xcart_dir>/upgrade_sql.php replacing the <xcart_dir> part with the true URL of your X-Cart installation. For example, http://www.example.com/xcart/upgrade_sql.php.
 
 
 
The script will display the progress of the upgrade task and finally report about the results.
 
 
 
5. Retrieve the value of the variable $blowfish_key from the file config.php in the root directory of your existing X-Cart installation and temporarily save it somewhere on your local computer.
 
 
 
You will be asked to provide the Blowfish key later in order that X-Cart to decrypt the data in the upgraded database.
 
 
 
6. Install a fresh copy of X-Cart 4.1.x. Make sure the copy of X-Cart that you are going to install is the same as the the version of the upgraded database.
 
 
 
When installing X-Cart:
 
 
 
* If you install X-Cart to the directory on your server or hosting account where a previous version of X-Cart is located, at the first step of the installation wizard select the radio button New Installation and enter the Auth code for the existing X-Cart installation. If you do not remember the code, retrieve the value of the variable $installation_auth_code from the file <xcart_dir>/include/install.php.
 
* At the step Preparing to Install X-Cart Database of the installation wizard, select the check box Update config.php only and enter Blowfish key for the upgraded database.
 
 
 
 
 
 
 
===Branch 4.0.x to branch 4.1.x===
 
 
 
1. Make sure the current version of your X-Cart installation can be upgraded to the target version directly.
 
 
 
Consult the chart in the opening section of the chapter Upgrading X-Cart. If there is no a direct upgrade pack, you will need to upgrade to the required version through several transitional steps (upgrades).
 
 
 
2. Obtain the database upgrade pack as described in the section Obtaining Upgrade Packs earlier in this chapter.
 
3. Put the upgrade pack to the X-Cart root directory on your server or hosting account.
 
 
 
* If you use a Windows-based server, or a UNIX-based server without terminal access:
 
** Decompress the archive with the upgrade pack to a directory on your system using your favorite compression program (WinZIP or any other archiver with support for TAR files).
 
** Use an FTP client to upload all the files contained in the archive (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
 
 
 
* If you use a UNIX-based server with terminal access:
 
** Use an FTP client to upload the archive with the upgrade pack to the X-Cart root directory on your server or your hosting account.
 
** Decompress the package using the following commands.
 
 
 
<pre>tar -xzvf <archive_filename>
 
</pre>
 
 
 
4. In a web browser, run the upgrade script <xcart_dir>/upgrade_sql.php replacing the <xcart_dir> part with the true URL of your X-Cart installation. For example, http://www.example.com/xcart/upgrade_sql.php.
 
 
 
The script will display the progress of the upgrade task and finally report about the results.
 
 
 
5. Retrieve the value of the variable $blowfish_key from the file config.php in the root directory of your existing X-Cart installation and temporarily save it somewhere on your local computer.
 
 
 
You will be asked to provide the Blowfish key later in order that X-Cart to decrypt the data in the upgraded database.
 
 
 
6. Install a fresh copy of X-Cart 4.1.x. Make sure the copy of X-Cart that you are going to install is the same as the the version of the upgraded database.
 
 
 
When installing X-Cart:
 
 
 
* If you install X-Cart to the directory on your server or hosting account where a previous version of X-Cart is located, at the first step of the installation wizard select the radio button New Installation and enter the Auth code for the existing X-Cart installation. If you do not remember the code, retrieve the value of the variable $installation_auth_code from the file <xcart_dir>/include/install.php.
 
* At the step Preparing to Install X-Cart Database of the installation wizard, select the check box Update config.php only and enter Blowfish key for the upgraded database.
 
 
 
 
 
 
 
===Branch 4.1.x to branch 4.3.x===
 
 
 
1. Make sure the current version of your X-Cart installation can be upgraded to the target version directly.
 
 
 
Consult the chart in the opening section of the chapter Upgrading X-Cart. If there is no a direct upgrade pack, you will need to upgrade to the required version through several transitional steps (upgrades).
 
 
 
2. Obtain the database upgrade pack as described in the section Obtaining Upgrade Packs earlier in this chapter.
 
3. Put the upgrade pack to the X-Cart root directory on your server or hosting account.
 
 
 
* If you use a Windows-based server, or a UNIX-based server without terminal access:
 
** Decompress the archive with the upgrade pack to a directory on your system using your favorite compression program (WinZIP or any other archiver with support for TAR files).
 
** Use an FTP client to upload all the files contained in the archive (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
 
 
 
* If you use a UNIX-based server with terminal access:
 
** Use an FTP client to upload the archive with the upgrade pack to the X-Cart root directory on your server or your hosting account.
 
** Decompress the package using the following commands.
 
 
 
<pre>tar -xzvf <archive_filename>
 
</pre>
 
 
 
4. In a web browser, run the upgrade script <xcart_dir>/upgrade_sql.php replacing the <xcart_dir> part with the true URL of your X-Cart installation. For example, http://www.example.com/xcart/upgrade_sql.php.
 
 
 
5. Read the X-Cart License Agreement that has been modified since X-Cart 4.1.x and click the Proceed with Upgrade button.
 
 
 
The script will display the progress of the upgrade task and finally report about the results.
 
 
 
6. Retrieve the value of the variable $blowfish_key from the file config.php in the root directory of your existing X-Cart installation and temporarily save it somewhere on your local computer.
 
 
 
You will be asked to provide the Blowfish key later in order that X-Cart to decrypt the data in the upgraded database.
 
 
 
7. Install a fresh copy of X-Cart 4.3.x as described in the section Installing X-Cart earlier in this manual. Make sure the copy of X-Cart that you are going to install is the same as the the version of the upgraded database.
 
 
 
When installing X-Cart:
 
 
 
* If you install X-Cart to the directory on your server or hosting account where a previous version of X-Cart is located, at the first step of the installation wizard select the radio button New Installation and enter the Auth code for the existing X-Cart installation. If you do not remember the code, retrieve the value of the variable $installation_auth_code from the file <xcart_dir>/include/install.php.
 
* At the step Preparing to Install X-Cart Database of the installation wizard, select the check box Update config.php only and enter Blowfish key for the upgraded database.
 
 
 
 
 
 
 
===Branch 4.2.x to branch 4.3.x===
 
 
 
1. Make sure the current version of your X-Cart installation can be upgraded to the target version directly.
 
 
 
Consult the chart in the opening section of the chapter Upgrading X-Cart. If there is no a direct upgrade pack, you will need to upgrade to the required version through several transitional steps (upgrades).
 
 
 
2. Obtain the database upgrade pack as described in the section Obtaining Upgrade Packs earlier in this chapter.
 
3. Put the upgrade pack to the X-Cart root directory on your server or hosting account.
 
 
 
* If you use a Windows-based server, or a UNIX-based server without terminal access:
 
** Decompress the archive with the upgrade pack to a directory on your system using your favorite compression program (WinZIP or any other archiver with support for TAR files).
 
** Use an FTP client to upload all the files contained in the archive (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
 
 
 
* If you use a UNIX-based server with terminal access:
 
** Use an FTP client to upload the archive with the upgrade pack to the X-Cart root directory on your server or your hosting account.
 
** Decompress the package using the following commands.
 
 
 
<pre>tar -xzvf <archive_filename>
 
</pre>
 
4. In a web browser, run the upgrade script <xcart_dir>/upgrade_sql.php replacing the <xcart_dir> part with the true URL of your X-Cart installation. For example, http://www.example.com/xcart/upgrade_sql.php.
 
 
 
5. Read the X-Cart License Agreement that has been modified since X-Cart 4.1.x and click the Proceed with Upgrade button.
 
 
 
The script will display the progress of the upgrade task and finally report about the results.
 
 
 
6. Retrieve the value of the variable $blowfish_key from the file config.php in the root directory of your existing X-Cart installation and temporarily save it somewhere on your local computer.
 
 
 
You will be asked to provide the Blowfish key later in order that X-Cart to decrypt the data in the upgraded database.
 
 
 
7. Install a fresh copy of X-Cart 4.3.x as described in the section Installing X-Cart earlier in this manual. Make sure the copy of X-Cart that you are going to install is the same as the the version of the upgraded database.
 
 
 
When installing X-Cart:
 
 
 
* If you install X-Cart to the directory on your server or hosting account where a previous version of X-Cart is located, at the first step of the installation wizard select the radio button New Installation and enter the Auth code for the existing X-Cart installation. If you do not remember the code, retrieve the value of the variable $installation_auth_code from the file <xcart_dir>/include/install.php.
 
* At the step Preparing to Install X-Cart Database of the installation wizard, select the check box Update config.php only and enter Blowfish key for the upgraded database.
 

Latest revision as of 21:43, 8 February 2013

NEED HELP? Feel free to contact our support team via your personal Help Desk accounts should you require any help in upgrading your X-Cart store to the latest version.

Applying upgrade packs

To apply an upgrade pack to your X-Cart installation:

  1. Place the files of your upgrade pack in the X-Cart root directory on your server or hosting account.
    • If you use a Windows-based server, or a UNIX-based server without terminal access:
      Decompress the upgrade pack archive to a directory on your system using your favorite compression program (WinZIP or any other archiver with support for TAR files).
      Use an FTP client to upload all the files of the decompressed archive (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
    • If you use a UNIX-based server with terminal access:
      Use an FTP client to upload the upgrade pack archive to the X-Cart root directory on your server or your hosting account.
      Decompress the archive using the following command:
      tar -xzvf <archive_filename>
  2. Make sure that the files that will be patched during the upgrade have world writable permissions. Names of the files to be patched are listed in the file <xcart_dir>/upgrade/[source-version]-[target-version]/file.lst.
    If you use a UNIX-based server, to set world writable permissions to the required files you can run the following shell command:
    for i in `sed -e 's/,.*$//g' < upgrade/[source-version]-[target-version]/file.lst`; do chmod 666 $i ; done
    replacing the [source-version] and [target-version] parts with the source and target versions of the X-Cart installation that you upgrade.
    Important! The command must be run from the X-Cart root directory.
  3. Log in to the X-Cart Admin area.
  4. Go to the 'Patch/Upgrade Center' page (Tools menu -> Patch/Upgrade. Before X-Cart 4.4.x: Administration menu -> Patch/Upgrade).
  5. In the 'Upgrade' section of the 'Patch/Upgrade Center' page, use the 'Target version' drop-down box to select the version to which you are going to upgrade your store (This corresponds to the upgrade pack you have uploaded). Also, in the 'I confirm that:' list, select all the checkboxes that apply. Click the Apply button.
    X-Cart will test whether the files that need to be patched by the upgrade pack can be patched successfully and will list the respective files showing their status. The file status definitions are as follows:
    • OK - File can be patched successfully.
    • Checksum error - Patch is corrupted. Try to download the patch again.
    • Non-writable - File does not have write permissions. Set write permissions on the file.
    • Not a file - Target is not a file. The original X-Cart structure has been modified and you need to apply the patch manually.
    • Not exists - File is missing. The original X-Cart structure has been modified and you need to apply the patch manually.
    • Could not patch - Patch cannot be applied to the file automatically, as the original X-Cart structure has been modified, and you need to apply the patch manually.
    • Already patched - File has been patched already.
      If your Patch/Upgrade center detects any problems (errors - marked in red), you will not be able to proceed with upgrading your X-Cart based store until these problems are resolved. You will have to go back, make the necessary corrections and run the upgrade pack applicability test once again.
      As soon as the applicability test has been passed successfully, you can continue with the upgrade pack application.
  6. Click the Apply patch button at the bottom of the page.
    X-Cart will start patching the files. After the upgrade pack has been applied, X-Cart will display the list of patched files and a detailed report about the changes that have been made.
  7. Click the Finish button at the bottom of the page to complete the upgrade pack application.

Applying database upgrade scripts

To apply a database upgrade script:

  1. Place the database upgrade script in the X-Cart root directory on your server or hosting account.
    • If you use a Windows-based server, or a UNIX-based server without terminal access:
      Decompress the database upgrade archive to a directory on your system using your favorite compression program (WinZIP or any other archiver with support for TAR files).
      Use an FTP client to upload all the files from the decompressed archive (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
    • If you use a UNIX-based server with terminal access:
      Use an FTP client to upload the database upgrade archive to the X-Cart root directory on your server or your hosting account.
      Decompress the archive using the following command:
      tar -xzvf <archive_filename>
  2. In a web browser, run the upgrade script <xcart_dir>/upgrade_sql.php replacing the <xcart_dir> part with the actual URL of your X-Cart installation. For example,

http://www.example.com/xcart/upgrade_sql.php .

  1. Read the X-Cart License Agreement and click the Proceed with Upgrade button.
    The script will display the progress of the upgrade procedure and finally report the results.

Troubleshooting

Checksum errors during upgrade

Checksum errors during upgrade are typically the result of corruption of the upgrade pack files either by the archiver program that was used to extract the upgrade archive or by the FTP client that was used to upload the upgrade pack files to the server.

If the upgrade pack files were extracted from the archive using WinZip, and now you are getting checksum errors, check your WinZip configuration to see if it is causing the problem: click Options, then Configuration, then select the Miscellaneous tab. The option 'TAR file smart CR/LF conversion' must be turned off. If it is not, clear this option and extract the files from the archive once again.

Also, ensure that your FTP client is set to transfer data in 'Binary' mode. If, instead of the 'Binary' mode, your FTP client is using the 'ASCII'/'Text' mode, the files of your upgrade pack may end up being corrupted due to the incorrect translation of line break character codes between Windows and Unix systems. Although the changes are not visible, the test performed by X-Cart returns checksum values that do not match the checksums of the original files; thus, you get checksum errors. To resolve this problem, you should set your FTP client to the 'Binary' mode and upload the upgrade pack files to the server again.