Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How I upgraded my database from 2.3.3 to 2.3.4


HowardR

Recommended Posts

I decided to switch my OSCommerce 2.3.3 store to a different URL. Instead of using 2.3.3 again in the new site, I decided to use 2.3.4 (the official version, not the Responsive/BootStrap version).

 

1. I installed my 2.3.4 store on my new URL. (Recommendation: don't change your username and password from those in your old store, since they are stored in the database.) In order to complete that installation, I used MySQL to created a new database which I called oscommerce234.

 

2. I logged into the admin of my 2.3.3 store and created a backup of my old database. Then I used FTP to download it to my home computer. Then I renamed it as backup233.sql and I used FTP to upload it to the backup directory (oscommerce-2.3.4/catalog/admin/backups) of my new store.

 

3. I downloaded the add-on which provides a .sql file for upgrading databases from 2.2MS2 to 2.3.3 (http://addons.oscommerce.com/info/8731).  It has been kept current and now includes the codes for upgrading from 2.3.3 to 2.3.4. (It does not, however, include the commands for upgrading to 2.3.4 Responsive/BootStrap.)

 

4. On my home computer I edited that upgrade file using my text editor (Notepad++). I only kept the commands for moving from 2.3.3 to 2.3.4. Then I saved the file with the name 233_to_234.sql and uploaded it using FTP to the backup directory (oscommerce-2.3.4/catalog/admin/backups) of my new store.  Here are the comments (lines that start with #) and commands that were in that file:

 

############

#2.3.4 SQL

############

#Increase column size

alter table sessions modify sesskey varchar(128) not null;

#Adds "Administration Tool -> Configuration -> Shipping/Packaging -> Allow Orders Not Matching Defined Shipping Zones"

insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Allow Orders Not Matching Defined Shipping Zones ', 'SHIPPING_ALLOW_UNDEFINED_ZONES', 'False', 'Should orders be allowed to shipping addresses not matching defined shipping module shipping zones?', '7', '5', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now());

 

5. Then I used Putty to log into the website of my new store. I logged into MySQL. Then at the MySQL prompts (mysql>) I created a new database which I called oscommerce233 and then I upgraded it by uploaded my backup233.sql file into it and then my 233_to_234.sql file into it. (Note that /var/www/html is the absolute path to my oscommerce-2.3.4 store; your absolute path will be different.)

 

mysql> CREATE DATABASE oscommerce233;

mysql> use oscommerce233;
mysql> source /var/www/html/oscommerce-2.3.4/catalog/admin/backups/backup233.sql;
mysql> source /var/www/html/oscommerce-2.3.4/catalog/admin/backups/233_to_234.sql;
mysql> quit;

 

6. Then I used FTP to download the two configure.php files (catalog/includes/configure.php and catalog/admin/includes/configure.php). I edited each of them using my text editor (notepad++) changing database references from oscommerce234 to oscommerce233. Then I uploaded both configure.php files back to the website. As a result, the following statement now appears in those configuration files:

 

define('DB_DATABASE', 'oscommerce233');

 

That's all there was to it. It seems that everything is working, but I won't know for sure until I get my store operational. If this doesn't work out, I can change the database references in those configuration files back to the way they were before (oscommerce234 instead of oscommerce233), and I'll be using the oscommerce234 database that was created when first setting up the oscommerce 2.3.4 store.

Link to comment
Share on other sites

Can I just ask, what made you decide not to use the better responsive version against the old and dated official version.  I only ask because many search engines penalize sites that are not responsive in their listings. Many people use smaller devices to view the internet now and your site will make it really difficult for them.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

Note: I almost have my store working but just realized there's a problem that I didn't anticipate. I have to go back through all of my admin configuration settings and change the absolute paths from the absolute path on my old server to the absolute path on my new server since those paths are stored in the database.

 

The main reason that I didn't go with responsive was that I didn't know how to update php on my website to the new version. Right now I have PHP version 5.1.6 and the responsive requires a newer version than that.

Link to comment
Share on other sites

PHP 5.1.6? Wow, that's ancient! If your host thinks that's sufficient, I would start looking around for a new host. But first, make sure it's not you forcing that level of PHP with an .htaccess or php.ini entry specifying it. Perhaps years ago you did something in your hosting control panel, or manually in a file, to spec that level (maybe it was more advanced than the default at the time). It might still be forcing you to that level when something up to date (5.5 or higher) is available. Ask your host for advice if you have no idea what to look for.

 

You definitely should get to 2.3.4BS Edge (responsive) ASAP. By the way, it sounds more like the meat of your DB upgrade was to change host configuration (paths, URLs, etc.) than a run-of-the-mill version upgrade, which the title implies. There are canned SQL scripts for doing version upgrades, but I don't think they handle configuration changes at the same time.

Link to comment
Share on other sites

Oh well! I had to upgrade to php 5.6 anyway. Version 2.3.4, unlike version 2.3.3.0 doesn't work with PHP 5.1.  In 5.1, no matter what I put in my cart, my cart stayed empty. Once I switched to php 5.6, the problem disappeared.

 

Upgrading to php 5.6 was a huge hassle. I found a great helpful website that guided me:

 

http://stackoverflow.com/questions/28823252/installing-php-5-3-29-from-sources-on-ubuntu-14-with-apache-2-module/29173314

 

The second answer down is mine. It tells how I did it using the first answer as my guide.

Link to comment
Share on other sites

Correction:

 

After upgrading to php 5.6, I still had the same error. After adding to my cart (as a customer) I would still get the message "Your Shopping Cart is empty!" I had made a mistake with one file (catalog/includes/classes/ shopping_cart.php) while installing Option Types V2 (Contribution 6818).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...