yomama360 Posted September 28, 2017 Share Posted September 28, 2017 We have an existing site working and running OSc 2.3.4 Everything is good, but we wanted to make a testing site for our own in-house mods. We are having trouble getting the local testing server to behave. It keeps trying to jump to the remote live site. When trying to access the admin the browser gives us an error "localhost redirected you too many times. Try clearing your cookies. ERR_TOO_MANY_REDIRECTS" Some things we tried: includes/configure.php files set to point at localhost (do I need to do anything with the includes/local folder? we have nothing in there names "configure.php") the RewriteBase in the .htaccess file changed to point to the localhost Is there something in application_top we need to change? The browser keeps putting an http in front of our localhost Should we have installed a vanilla OSc onto the local server THEN port everything over? As it is, we never installed, just ported over and changed values. Apparently there is something we missed. Thanks in advance. "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends upon the unreasonable man." -- George Bernard Shaw Link to comment Share on other sites More sharing options...
yomama360 Posted September 28, 2017 Author Share Posted September 28, 2017 Better Question: What are the recommended steps to setting up a testing server for OSc? "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends upon the unreasonable man." -- George Bernard Shaw Link to comment Share on other sites More sharing options...
ArtcoInc Posted September 28, 2017 Share Posted September 28, 2017 @yomama360 What *I* do is ... (assuming you have a full copy of both the files and the database from your real site) Once you are sure that the server is running correctly (Apache, PHP, mySQL, etc) ... 1) I install a clean copy of osC, and make sure that the store is functioning correctly 2) Make a copy of the localĀ /catalog/includes/configure.php *and* /catalog/admin/includes/configure.php files to somewhere safe. 3) Erase everything from the /catalog directory 4) Using something like phpMyAdmin, empty the database. Do NOT delete the database, just empty it. You still need the empty database, including its name, the user name, and the user password. 5) Import your real database onto your local server into the database you just emptied 6) Copy all of your real site files into the /catalog directory on your local server. 7) Copy the /catalog/includes/configure.php *and* /catalog/admin/includes/configure.php files you had backed up to somewhere safe into the /catalog directory on your local server. This will overwrite the two filed from your real site. You should now be all set. HTH Malcolm Link to comment Share on other sites More sharing options...
ArtcoInc Posted September 28, 2017 Share Posted September 28, 2017 @yomama360 Two notes about the above instructions: 1) By installing osCommerce on your local server first, you create your two configure.php files. These contain all of the correct directory paths and the database information. This is also why you need to empty the database that is created during the installation, and not delete it. 2) Make sure that you are using the same version of osCommerce on your local server that you are running on your real store. Different versions may/will have different database structures, which will lead to problems if you try to use databases from different versions. Malcolm Link to comment Share on other sites More sharing options...
yomama360 Posted September 29, 2017 Author Share Posted September 29, 2017 Thanks, I think running the OSc install new (as opposed to just dragging all the files over and modifying) was the key we were missing. Also, for future readers: After install and porting over the old content & database as described above, we were having trouble getting into the admin. Server error! The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. If you think this is a server error, please contact the webmaster. Error 500 We commented out everything on the admin side .htaccess file and we got in. It might have been some code ported over from the live server. Thanks again. "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends upon the unreasonable man." -- George Bernard Shaw Link to comment Share on other sites More sharing options...
MrPhil Posted September 29, 2017 Share Posted September 29, 2017 Even better, if you already have a commercial server (that your site is running on), use it (private "test" directory) instead of a local PC-based server installation. That way, you're guaranteed to be perfectly compatible with the server, and not have any surprises when you try to port over your changes to the production server. The only reason you might want to use a local server is if your production server does not (yet) offer the necessary PHP level, but you anticipate that it will in the near future, and want to be ready for it. By the way, osC 2.3.4 is obsolete and should not be used. Use osC 2.3.4BS "Edge" instead, which is up to date. Link to comment Share on other sites More sharing options...
sanjayrub Posted December 27, 2017 Share Posted December 27, 2017 May be, you have backup the live site database in local server can create problem. it can be issue of other files. you should try with fresh installation in local server. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.