Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: help migrating to different server

  1. #1
    Active Member
    help migrating to different server


    Join Date
    Jan 2009
    Posts
    171
    Total Contributions For

    jmelson     $ 50.00
    Rep Power
    10


    Default help migrating to different server

    Hello, I have an existing store running oscMax v2.5 RC1 with some mods to shipping modules. I need to update the server to comply with the TLS requirements.

    So, I have copied over the whole store file tree, and the mysql database files to a machine running Debian 9, with php 7.0.19-1, mysql 5.0.12 and apache 2.4.25

    I have some static pages that work fine, and I put a little test.php file there and it works. But, none of the web store pages show up, for instance osc2.5/catalog/index.php never shows anything - just a blank page.

    I'm thinking that the mysql database is not set up right. Can somebody walk me through the process from copying over the database files to getting them to be served up correctly?

    OK, I now exported and imported the database, instead of just copying the files. That made no difference.

    Thanks a bunch in advance!

    Jon
    Last edited by jmelson; 01-08-2018 at 08:06 AM. Reason: tried another way

  2. #2
    Member
    help migrating to different server


    Join Date
    May 2017
    Posts
    66
    Total Contributions For

    Markcm     $ 0.00
    Rep Power
    2


    Default Re: help migrating to different server

    I'm a rookie but I have some experience in this area and will try to help.

    First and most important, have you edited your catalog/includes/configure.php and catalog/admin/includes/configure.php files? These will be your first [required] steps to point at your new server and database location.

    Next, I suggest caution with php7, I think you'll run into some issues with compatibility and suggest you stick with PHP5.6

  3. #3
    Active Member
    help migrating to different server


    Join Date
    Jan 2009
    Posts
    171
    Total Contributions For

    jmelson     $ 50.00
    Rep Power
    10


    Default Re: help migrating to different server

    OK, thanks a lot for the info. Yes, I think I edited these files, but maybe I only edited ONE of them? I will go back and check!

    If that doesn't fix it, I will see about backing off the php version.

    Thanks again,

    Jon

  4. #4
    Active Member
    help migrating to different server


    Join Date
    Jan 2009
    Posts
    171
    Total Contributions For

    jmelson     $ 50.00
    Rep Power
    10


    Default Re: help migrating to different server

    OK, I failed to change the admin/includes/configure.php but fixing that didn't improve anything. I'm using a Debian 9 system, and apparently php7.0 is the only version that can be installed from the repo for that system.

    I'm kind of lost, as I just get a blank page or a hang, when I try any php page from either admin or the catalog. I do get a 500 return code in the access.log file, which is
    "internal server error".

    But, I put in a test file with :
    <?php phpinfo(); ?>

    and I get a page of info. Also, it serves up a bunch of static html pages just fine.

    Thanks,

    Jon
    Last edited by jmelson; 01-08-2018 at 06:41 PM.

  5. #5
    Active Member
    help migrating to different server


    Join Date
    Jan 2009
    Posts
    171
    Total Contributions For

    jmelson     $ 50.00
    Rep Power
    10


    Default Re: help migrating to different server

    OK, I did a bunch of hacking around in includes/functions/database.php to change all occurrences of mysql_xxx to mysqli_xxx and got a bit further. Now I get :

    select configuration_key as cfgKey, configuration_value as cfgValue from configuration

    [TEP STOP]

    from the catalog/index.php page.

    Does that ring any bells?

    Thanks,

    Jon

  6. #6
    Member
    help migrating to different server


    Join Date
    May 2017
    Posts
    66
    Total Contributions For

    Markcm     $ 0.00
    Rep Power
    2


    Default Re: help migrating to different server

    I don't think you can simply switch from mysql to mysqli on an old installation like 2.5RC1. My guess is that you will have to run PHP5.6 and mysql with oscmax 2.5RC1.

    Regarding the ...includes/configure.php files, the .../catalog/includes/configure.php is for your store [aka: catalog] pages, the one in .../admin/includes/configure.php controls your admin panel pages. Both MUST BE reconfigured when you move your files to a new host. I think this is where your problem lies. Although all defines must be correct, many only change depending if you are installed in the root vs. in a subdirectory such as www.yoursite.com/catalog. The primary defines that must change when you move hosts and database locations are:
    PHP Code:
    define('HTTP_SERVER''http://yoursite.com'); // Note this could also be a localserver if you're installed on a home PC or NAS
    define('HTTPS_SERVER''https://yoursite.com'); // Note this could also be a localserver if you're installed on a home PC or NAS
    define('DIR_FS_CATALOG''/home/content/xx/xxxxxxxx/html/'); //this must be edited to match your host
    define('DB_SERVER''yourhostedAddress.hostedresource.com'); //this is the location of your database and definitely changed if you moved your site and database
     
    define('STORE_SESSIONS''mysql'); // If you are on PHP5.6 or less this is mysql, if you are on PHP7 or higher it will be mysqli (note that older oscmax installations will probably have issues with PHP7) 

    I have recently completed a move of oscmax 2.5.4 (which is the most current release), and a oscmax 2.5.5_development which is a public beta of the newest release (still in development but mostly functional). Despite what a few others have said, both of these had issues with PHP7. After some tweaking, I ended up with a fairly robust installation of 2.5.5_dev running on PHP5.6 and kept notes of what needed to be changed/tweaked to get it running. The only residual issue I had on PHP7 was that the bottom of the Order details page is not showing so I cannot add comments to an order; I suspect there is an easy fix for this and I have reported it to the development thread here but I found it easiest for now to revert to PHP5.6.

  7. #7
    Active Member
    help migrating to different server


    Join Date
    Jan 2009
    Posts
    171
    Total Contributions For

    jmelson     $ 50.00
    Rep Power
    10


    Default Re: help migrating to different server

    I fixed the admin/includes/configure.php but that didn't help. I'm thinking of backing off the whole OS to Debian 8 and try again. There is some time pressure as I have to have the TLS 1.2 support up by the end of February or the payment processors will stop talking to me. So, I can't wait on fixes.

    The reason I had to modify the store was that FedEx stopped giving quotes for a number of countries after province codes were changed. I hired a guy to patch the latest osc FedEx module in. Does anyone know if that is all fixed in oscMax? And, if so, is there a migration tool for 2.5 RC1 to the latest oscMax? That would be the best way to go for sure!

    Thanks,

    Jon

  8. #8
    Member
    help migrating to different server


    Join Date
    May 2017
    Posts
    66
    Total Contributions For

    Markcm     $ 0.00
    Rep Power
    2


    Default Re: help migrating to different server

    Are you sure they are "fixed"? Even though PHP7 probably wont support all aspects of the site with with 2.5RC1, I think it would still load the home page, even if messy/broken you'd probably get something. Where are you hosted? Is it a local installation or on a hosting service like Godaddy or any of the other host service providers?

    I am not familiar with how you are currently hosting your files "a machine running Debian 9, with php 7.0.19-1, mysql 5.0.12 and apache 2.4.25". I don’t believe there is an automated migration tool, and there almost definitely is not one that will jump from 2.5RC1 to 2.5.5_dev. I initially tried incrementally updating to 2.5.2 then 2.5.3 then 2.5.4 but ended up with a broken mess.

    Here’s my opinion on things to consider if you are moving your complete site:

    Make a local (on you PC) copy of all your current working OSC files, make sure all of the files download without error. I use Filezilla FTP client which shows a report of successful vs failed up/downloads.

    Upload these files to the new host you wish to run them from. If this new host does not have PHP5.6, I honestly recommend aborting and getting something that does have it.

    Do the same with your database, export it, store a copy on your local PC, then import it to your new hosted database.

    Now edit your two …./includes/configure.php files to redirect them to the new hosted location (including the database server address). If this is a personal computer the hosting define locations will be something like ‘localhost’

    Assuming the environment is configured correctly and runs PHP, these steps should be enough to move your site.

    Now here’s what “I” would, and did, do:

    • Download the most current 2.5.5 Development branch files from bitbucket.
    • Upload the package to the new host
    • Run the installation script. You’ll have to know the server address for the database too
    • The script will load a fresh/empty 2.5.5 compliant database if your address and permissions are defined correctly
    • The script will write new .../includes/configure.php files that are corrected
    • Note that the 2.5.5 database is mostly the same but does have a few updates compared to prior versions
    • Once you have a vanilla/stock installation running and you can open the home page [yoursite/index.php], now you can start applying your customization by:
    • I opened the old working database and the new blank database and individually exported tables to sql text box which I copied and then pasted into the sql text box of the new database. This takes about an hour to go through the complete database. I did this for tables that I wanted carried over such as
    o Customers, addresses, orders, order details, order status…
    o I did not copy the configuration tables, instead I walked through the configuration from the admin panel of the new installation
    • Copy over things like images and logo images

    Use a note utility or text files to keep track of every step and if you hit a bump, make a note of what it is so you can track it.

    If you want to go this route, it should work on PHP7 with the exception I noted about the bottom of the order detail page not showing and I can give you a complete list of the steps I recorded in my notes (they are clearly laid out and grouped by actions such as INSTALL/FIX/CUSTOMIZE. I think you can access the order comments from the Order Editor if running 2.5.5_dev on PHP7 although I don’t recall since I switched to 5.6 so that it showed correctly on the order details page.

    Note that I only use usps and ups so I don't know if the fedex modules are working. And to be honest I don't even know what "TLS 1.2 support" is or if I have it; my site is on godaddy with an SSL certificate. My only payment processor is PayPal standard; I don't handle any payment information.
    Last edited by Markcm; 01-09-2018 at 09:52 AM. Reason: spelling

  9. #9
    Active Member
    help migrating to different server


    Join Date
    Jan 2009
    Posts
    171
    Total Contributions For

    jmelson     $ 50.00
    Rep Power
    10


    Default Re: help migrating to different server

    These are hosted locally. The "real" store is on an ancient Ubuntu host, that is also the firewall, mail server, LAN router, etc. I set up another machine with the Debian 9 install. I will have to check, I think I can get php5.6 on Debian 8.
    I don't handle "card information" either, which relieves me of a lot of PCI compliance hassles. I use PayPal and Authorize.net
    PayPal seems to say they won't allow you to refer transactions to them for processing unless you are at least TLS 1.1 compliant after Feb. 28.
    TLS is an encryption method that is part of the web server (browsers, too). There are online services that will check a site to verify what TLS support you have (local or hosted).

    The only thing that a newer oscMax version would provide that I know about is sort order control on the category listing pages. I had to hack that by putting numbers in front of the item descriptions so they alphabetized in the order I wanted them.

    I can check the FedEx province codes in a few minutes with test orders.

    So, I will downgrade to Debian 8 and see if my store will fire up. Then, I can decide whether to just rebuild the whole store in the new version or keep the old one as is.

    Thanks much for the info,

    Jon

  10. #10
    Member
    help migrating to different server


    Join Date
    May 2017
    Posts
    66
    Total Contributions For

    Markcm     $ 0.00
    Rep Power
    2


    Default Re: help migrating to different server

    I don't know if this will help, but here is a view of my .../includes/configure.php from my local installation of 2.5.5_development on my NAS using PHP7.1 where the files are in the directory .../oscm/catalog/ and the address of the NAS is 192.168.0.201. I've generalized a few things like the Database username and password.

    PHP Code:
    <?php
    /*
      osCmax e-Commerce
      http://www.oscmax.com

      Copyright 2000 - 2011 osCmax

      Released under the GNU General Public License
    */

    // Define the webserver and path parameters
    // * DIR_FS_* = Filesystem directories (local/physical)
    // * DIR_WS_* = Webserver directories (virtual/URL)
      
    define('HTTP_SERVER''http://192.168.0.201');
      
    define('HTTPS_SERVER''http://192.168.0.201');
      
    define('ENABLE_SSL'false);
      
    define('HTTP_COOKIE_DOMAIN''192.168.0.201');
      
    define('HTTPS_COOKIE_DOMAIN''192.168.0.201');
      
    define('HTTP_COOKIE_PATH''/oscm/catalog/');
      
    define('HTTPS_COOKIE_PATH''/oscm/catalog/');
      
    define('DIR_WS_HTTP_CATALOG''/oscm/catalog/');
      
    define('DIR_WS_HTTPS_CATALOG''/oscm/catalog/');
      
    define('DIR_WS_IMAGES''images/');
      
    define('DIR_WS_ICONS'DIR_WS_IMAGES 'icons/');
      
    define('DIR_WS_INCLUDES''includes/');
      
    define('DIR_WS_BOXES'DIR_WS_INCLUDES 'boxes/');
      
    define('DIR_WS_FUNCTIONS'DIR_WS_INCLUDES 'functions/');
      
    define('DIR_WS_CLASSES'DIR_WS_INCLUDES 'classes/');
      
    define('DIR_WS_MODULES'DIR_WS_INCLUDES 'modules/');
      
    define('DIR_WS_LANGUAGES'DIR_WS_INCLUDES 'languages/');


      
    define('DIR_WS_DOWNLOAD_PUBLIC''pub/');
      
    define('DIR_FS_CATALOG''/volume1/web/oscm/catalog/');
      
    define('DIR_FS_DOWNLOAD'DIR_FS_CATALOG 'download/');
      
    define('DIR_FS_DOWNLOAD_PUBLIC'DIR_FS_CATALOG 'pub/');


    // define our database connection
      
    define('DB_SERVER''localhost');
      
    define('DB_SERVER_USERNAME''yourDBusername');
      
    define('DB_SERVER_PASSWORD''yourDBpassword');
      
    define('DB_DATABASE''yourDBname');
      
    define('USE_PCONNECT''false');
      
    define('STORE_SESSIONS''mysqli');
    ?>
    If I switch my NAS to PHP5.6 the only change I need to make is that last line to define('STORE_SESSIONS', 'mysql');

    The admin/includes/configure.php would need to be adapted as well.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Server/Hosting Issue] Migrating to hosting with PHP 5.5 issue
    By Vera in forum Installation/Setup
    Replies: 4
    Last Post: 03-26-2016, 01:40 AM
  2. Migrating to RC4?
    By bikiniduck in forum osCmax v2 Installation issues
    Replies: 1
    Last Post: 03-08-2009, 02:12 PM
  3. Help migrating to OSC Max
    By jptechnical in forum osCMax v1.7 Installation
    Replies: 2
    Last Post: 06-14-2004, 01:56 PM
  4. Migrating data over from osc MS2 getting ERRORS HELP!!
    By FilmDirector in forum osCMax v1.7 Installation
    Replies: 7
    Last Post: 05-10-2004, 01:06 PM
  5. Migrating from MS2 to MS2-MAX
    By nrvtoday in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 10-04-2003, 06:04 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •