Jump to content
Latest News: (loading..)
yomama360

Problems with local testing server

Recommended Posts

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.

Edited by yomama360
formatting

"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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

@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

Edited by ArtcoInc

If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Frozen" release here

Share this post


Link to post
Share on other sites

@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


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Frozen" release here

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get (stable) Frozen or (unstable) Edge. See also the naming convention and the latest community-supported responsive "Edge" release

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×