Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

From production to local (WAMP testserver)


Mr. M

Recommended Posts

Hi,

I downloaded the production website (HTTPS)  locally on a WAMP server (HTTP) to have a testing environment. Imported the database (1 GB) and made the changes to the configuration file (yes only 1 file left with all settings, ENABLE_SSL-false etc). Since a webdeveloper changed the total website last 10 years it's not a standard OSC website anymore but I guess thats with most shops. 

Everything seems to work fine until I place a test order. I nearly get everything done but the browser gets stuck on a blank screen in the checkout_process.php, it won't go to the checkout_success.php page. In the admin, the order is already there, but the cart isn't empty when I go back so it's checkout process isn't finished. The blank screen pretty much annoys me because I don't see any error message, nothing in the logfiles (php/apache/mysql) either. 

I'm working with Visual Studio Code but I'm not familiair with debugging with it to find out where in the process the site gets stuck. 

Any tips/hints to check or to find out what's wrong? Or does anybody recognize the blank screen issue in checkout_process ?

 

Thnx.

Maurice

Link to comment
Share on other sites

@GaafGeel

17 minutes ago, GaafGeel said:

I downloaded the production website (HTTPS)  locally on a WAMP server (HTTP) to have a testing environment. Imported the database (1 GB) and made the changes to the configuration file (yes only 1 file left with all settings, ENABLE_SSL-false etc). Since a webdeveloper changed the total website last 10 years it's not a standard OSC website anymore but I guess thats with most shops.

1) There are TWO configuration files to change. Have you correctly changed both?

/catalog/included/configure.php

/catalog/admin/includes/configure.php

19 minutes ago, GaafGeel said:

Everything seems to work fine until I place a test order. I nearly get everything done but the browser gets stuck on a blank screen in the checkout_process.php, it won't go to the checkout_success.php page. In the admin, the order is already there, but the cart isn't empty when I go back so it's checkout process isn't finished. The blank screen pretty much annoys me because I don't see any error message, nothing in the logfiles (php/apache/mysql) either.

2) What payment module do you have set up? Could it be that the shop is hanging because the payment module isn't working?

3) If you do not have both configuration files changed correctly, it could be that the site does not know where to return to to display the checkout_success.php file.

3) You say that you are getting a "blank screen." Is this true? If so, that's most likely a PHP coding error. In your browser, do a "view source" and see what code is being processed.

HTH

M

Link to comment
Share on other sites

@GaafGeel

Copyright 2003? In that case, the site would be based on osC v2.2 ... *very* old, vulnerable to hacks and threats, and no longer supported.

1) You're going to get a LOT of recommendations that it's time to upgrade to the latest version of osC. Please consider it!

2) If you HAVE to get this running on your local WAMP server, I'd try to find a copy of osC v2.2. You can find one here:

https://www.oscommerce.com/Products

At the very bottom of the page, select the red Release History box. You'd want v2.2 Milestone 1. Install that on your WAMP server (in a different directory and database), let it generate your configuration file, and view it.

M

PS: It really is time to upgrade. Really

 

Link to comment
Share on other sites

I will strongly second the suggestion to upgrade to the latest osC ("Frozen"). You can even go bleeding edge with "Edge", but don't do that unless you're a competent programmer. Either will require at least PHP 5.6 (better yet, 7.1). Remember that PHP 7.1 is the oldest supported PHP.

I also suggest that you not use any *AMPP for development or testing, unless you fall into one of the following two categories: 1) you don't have a real commercial server account and domain yet, and want to play a bit before committing to buying such, or 2) your host does not offer the PHP or MySQL level you need for development work. Never run a real website (especially involving real money) on your PC -- hackers will eat you alive. You really don't save much by developing and testing on your own PC, because usually the differences in PHP, MySQL, Apache, etc. will mean a lot of rework when you transfer your "working" site to a real server. If you can, set up a "test" or "development" directory on your real server (password protect it if you want).

A blank screen ("White Screen of Death") usually means a severe PHP code error. You might get lucky and find an error message or partial code in "view page source", or an error message logged somewhere on your system.

Link to comment
Share on other sites

Hi,

Thnx for your reactions. The original site is up to date and running on php 7.1 so don 't let the old text in the config file fool you! The WAMP server is only for me to start working on the site and make changes without having to upload every change to a testing environment online, this realy sucks (imo). I was hoping that someone also had this kind of problem and could help me figure out what might be wrong. So the *AMP server is not the working server, that one is a professional server (not some shared hosting thing) so please don't let those things confuse you. The blank screen of death realy is no text in the source code and no errors in the log files on the server.

Link to comment
Share on other sites

@GaafGeel

If your site is indeed based on osC v2.2, AND it is "up to date and running PHP 7.1", someone has done a lot of work on the site (ie: created their own fork), and that makes very it difficult (if not impossible!) for someone here to be able to support it with you.

That said, since it still runs on your host, but not your WAMP server, I still think it is a configuration issue (I don't know v2.2, but some things in your configuration file looked off to me). That's why I suggested downloading v2.2 MS1, installing a stock copy of it, and examining the created configuration file(s).

Beyond that, I don't know what else to say. Since it seems you are running your own fork of osC, getting help will become more  difficult (and/or expensive) as time goes on. I will once again recommend you at least download the latest version of osC (NOT the 'official' version! Get the 'Community Edition' ... there's a link in my signature below), and at least see what it does. I understand that many (most?) shop owners will say that their shop is too highly modified, and they can't (won't) take the time to move their store to a new version. But, as the software world evolves and advances, there will come a time where you store will become incompatible, and will crash. If this is a source of income for you, what will you do then?

HTH

M

Link to comment
Share on other sites

8 hours ago, GaafGeel said:

Are you all developing on a remote live server?

You could save your self a lot of effort by simply installing a copy of the production site on a subdomain or new directory.

That way you are testing on a safe live site on exactly the same conditions as your prodution site.

If you not happy doing that then simply get another domain and use it as a test site or development! either way it's much better than a local server.

Note. If you have a heavely modified 2.2 shop then moving to the new CE is no easy thing you will probably find many of the mods you have will need to be re coded if they are not covered by on of the add-on's that have been updated.

 

Link to comment
Share on other sites

@ArtcoInc I'm going to install the latest version online and go to take a look how it runs. I also see it's a Bootstrap 4 version, so the tables are finally gone now? 😉  

Yes the shop is this heavily modified that it would be horrible to upgrade or to start over again. The shop is made to automatically import new products and prices of 25 suppliers. Updates prices and stock every 2 hours. More than 25.000 products online and more than 400.000 products on the waiting list to be added to the site.  

Still I'm very curious on how you guys develop, do you always work on remote servers? I hate this because I constantly need to upload the files to see the changes I make, or do you do something different?

Link to comment
Share on other sites

1 hour ago, GaafGeel said:

Still I'm very curious on how you guys develop, do you always work on remote servers? I hate this because I constantly need to upload the files to see the changes I make, or do you do something different?

I can't speak for most people but I use an on-line server so that I'm developing in an environment that I'll be working with.  Editing and uploading files back to the site is no more complicated than saving them back to your computer using tools like Filezilla and NotePad++.   To me this is a better approach then finishing your development work and finding out that it doesn't work because it was built in a different operating environment.  For me those problems tend to be very difficult to trouble shoot and need to be avoided.

Dan     

Link to comment
Share on other sites

Be careful with "the latest" (Edge) -- I'm not sure that the BS4 portion is considered production-ready (i.e., to use in a real shop with real customers). "Frozen" is BS3 but is quite stable.

Yes, most people use a "remote server" (a live production server that they'll be running the real site on). My experience has been that people developing on *AMPP PCs have to put in a lot of effort to convert the finished site to the server's PHP and MySQL levels.

Link to comment
Share on other sites

In any case, ask your host if/how it can be done. Usually it can, even though you may have to manually edit the test directory's .htaccess file. Assuming, of course, that your hosting service supports several PHP versions (the better ones do).

Link to comment
Share on other sites

Most cPanels have this option, look for PHP Selector and simply pick the version you need and set it up as required.

This will apply to the domain you select this on. To apply to a subdomins needs more work.

https://forums.cpanel.net/threads/possible-to-select-different-php-versions-for-subdomains-and-folders.610175/

image.png.e5c4fdddf0ae75e8c8ee06d2802535a6.png

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...