Jump to content



Photo
- - - - -

How to migrate from my upgraded 2.31 to something that works on newer PHP?


  • Please log in to reply
6 replies to this topic

#1   inra311

inra311
  • Members
  • 20 posts
  • Real Name:Ingo
  • Gender:Male

Posted 12 February 2017 - 09:49

Can anyone help or confirm me in what I should do in my situation:

 

 

I started with OSC 2.2 - modified with various contributions - on a shared host. As the host disabled previous PHP versions, I did a lot of manual updating steps some time ago and ended on something like v2.3.1, running fine on PHP 5.3 at the moment.

 

I did not continue with updating as I had to find out that after following all the update instructions so far, my shop is still not a true 2.3.1 shop but only 'something similar'. For this reason some of the next update steps became more difficult (the code parts to be replaced is not as it is in the instructions).

 

I fear that the host will sooner or later disable PHP 5.3. I can switch PHP versions in the log in area of the host's website between 5.3, 5.6, and 7.0. I recently set it to 5.6 to check again what will happen and found out that the catalog 'was still there' at first glance, but I could not even log in into the admin area (fatal error, white screen).

 

What also makes me panic now was the note that the host allows me to go back to 5.3 only within 30 minutes (and never again in case I am accidentally logged out of his website during this time). This will make trying step for step fixes even more difficult.

 

What to do now?

 

1) I guess the recommended thing is to install a new 2.3.4BS, and migrate database tables into the new installation. As updating to 2.3.4 before (see above) is difficult, I guess that the database migration script I read about will not work in my case (it requires 2.3.4??). Should it be possible to export/import at least the most important database table (customers, orders, products,..) by hand? What problems to expect here?

 

2) Is there any way I might go to update not everything from my 2.3.1 but only the steps required to get it running on PHP 5.6. I understand that I need to replace all mysql functions to mysqli, but I am afraid that there is more coming... ? Is there a fix to at least come into the admin again in case the host switches to 5.6 before I finished the upgrades?

 

3) I might pay someone with more experience to do this for me. As I am a tiny one-man company my ressources are rather limited. What might be the total to expect (at least a rough number to give me an idea)?

 

Thanks for any help


Edited by inra311, 12 February 2017 - 09:53.


#2   Jack_mcs

Jack_mcs
  • Members
  • 28,312 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 12 February 2017 - 13:43

It's unlikely your current code will run under 5.6. In theory, it could be made to work but the changes needed may be more involved than switching to the BS version. There's not a list of changes needed since some of the problems may involve addons you have installed so that is a case-by-case situation.

 

There's no reason for you to lose any data with the database conversion but there isn't a simple method to convert it. At least, not one that works for all cases and is easy to do for non-experienced users.

 

You can follow the upgrade instructions included with each version of oscommerce to get to the version you want, except the BS one, but they are not simple changes in many changes. It is possible for you to make them but if you are not a programmer, or at least familiar with changing code, you may run into problems.

 

The bottom line is that there is no easy way forward for you, especially if you are doing it yourself. From the sounds of it, you will need to hire someone to make the changes for you.



#3   MrPhil

MrPhil
  • Members
  • 6,923 posts
  • Real Name:Phil
  • Gender:Male

Posted 12 February 2017 - 15:17

It sounds like you installed the 2.2 to 2.3 upgrade at some point, which resulted in what we call a "Frankenstore". Neither fish nor fowl, it leaves you with a difficult to update beast (not really 2.3). It was really stupid for The Powers That Be to have put out such a thing, and even worse that they didn't withdraw it.

 

Anyway, it is always possible to make a clean install of 2.3.4BS Edge (the only currently supported version). It runs on PHP 5.6 out of the box, and may be updated at some point to run on 7.0 (there are instructions on this forum for doing it manually). Your database will require some effort to convert to the current version, but it can be done, and in the end it will be worth the effort. Worst case, you can manually compare the schemas (layouts) for the two versions and modify a copy of your current database via phpMyAdmin. The only fly in the ointment at that point will be replicating various add-ons and custom code modifications. Some things are now built into osC, some are now done with CSS modifications (user.css file, override stock settings), some add-ons have been upgraded to work with 2.3.4BS, and other add-ons will require some hard work.

 

You definitely want to get away from PHP 5.3 as quickly as you can. It's long out of support, and hackers love to attack sites running it. Eventually there may be a 2.3.5 official version (follow-on to the official 2.3.4, supporting PHP 5.6, but not related to 2.3.4BS). Don't wait for it. Eventually there should be an official 2.4 version, which is supposed to allow a fairly easy migration from 2.3.4BS. It's only in beta test right now, so don't hold your breath. You have no choice but to go to 2.3.4BS before your host stops letting you play on PHP 5.3!



#4   inra311

inra311
  • Members
  • 20 posts
  • Real Name:Ingo
  • Gender:Male

Posted 12 February 2017 - 18:59

Thank you for your answers. I decided to go for 2.3.4 BS and try at least to get the customers, orders, and products imported from the old database.

 

>>Anyway, it is always possible to make a clean install of 2.3.4BS Edge (the only currently supported version).

 

I already started with 2.3.4BS, downloaded, installed and configured things for the wole day. But, what is *edge*? I hope I installed the right one, the one from this thread: http://forums.oscomm...latest-version/

 

Please tell me that it IS the one to go with...


Edited by inra311, 12 February 2017 - 19:00.


#5   Jack_mcs

Jack_mcs
  • Members
  • 28,312 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 13 February 2017 - 03:23

The link in that thread is the correct one. The latest BS version is referred to as "Edge" but the zip archive is named Master.



#6   inra311

inra311
  • Members
  • 20 posts
  • Real Name:Ingo
  • Gender:Male

Posted 13 February 2017 - 21:31

Thanks, that is good.

 

Today I phoned my host's hotline to ask if they already have an idea when they might disable PHP 5.3..

In fact they already  know: in exactly 7 days !!!!!!!!!!!!!

 

Good that I already started. I even made a lot of progress the last three days: I started to import  easy stuff like categories, tax classes and zones, shipping cost tables,... and today all the products tables and images, with success, all works!!
I really did it step for step with comparing database table schemes and exporting/importing tables. Sometimes I even used CSV to import as I could add missing columns easily in LibreOffice (Excel did not keep the required ".." around cells but with LibreOffice it was possible!)

 

May I ask:

- I got some weird characters in the German language (my old database was latin1_german1...). Will the 'convert to UTF-8' option under tools/database tables help? (If not i might do some search and replace for the weird characters in the database, or is there a better way?)

 

- Do I understand correctly that with 2.3.4BS the time of manually editing code for updating or adding features should be over :) , at least as long I only use addons with BS compatibility?

 

- I downloaded a German language pack for 2.3.4 but with this one some stuff in modules or the headbar is missing, and I do not see any orders in the backend at all while being switched to German (!?). Are there any language packs especially for BS available (not found on the OSC addon pages)?
 

- Is the Paypal module difficult to get running?

 

Sorry, many questions... I have only 6 days left to migrate...

 

Thanks for any help


Edited by inra311, 13 February 2017 - 21:33.


#7   MrPhil

MrPhil
  • Members
  • 6,923 posts
  • Real Name:Phil
  • Gender:Male

Posted Yesterday, 18:38

  • weird characters in the German language -- could you please clarify this? Are you now running with UTF-8 pages, and getting ?-in-black-diamond glyphs for some characters? These could be Latin-1 accented characters (the "_german1" part is collation order for sorting operations) that are invalid UTF-8 bytes. If your database field(s) are still Latin-1, you should be able to convert them to UTF-8, and translate them to UTF-8 in the process. If they are already UTF-8, you will either have to manually edit the fields in phpMyAdmin, or export the tables and re-import them correctly (into UTF-8 fields, with the IMPORT told that the file is Latin-1). It all depends on what the exact state of the data is.
  • the time of manually editing code for updating or adding features should be over -- more or less. There still may be cases where it will require manual edits, but the authors are trying to get away from that.
  • German language pack for 2.3.4 -- I wouldn't be surprised if a lot of entries for 2.3.4BS are missing from the 2.3.4 version. Look around to be sure you didn't overlook a 2.3.4BS-specific version of German support. If there isn't one, you'll need to compare the 2.3.4BS English (default) language files with the German package, and translate and update as necessary. Please consider returning your work to the community as a new or updated add-on.
  • Paypal module -- I do not have experience with this, but I haven't seen any reports of it being difficult. First make sure it's not built into 2.3.4BS before trying to install an add-on for it. I think the procedure for enabling it may have changed a bit between 2.3.4 and 2.3.4BS, so follow instructions carefully.