Print Page | Close Window

Moving Hosts - DB connection issue

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Using ProductCart
Forum Description: Running your store with ProductCart
URL: https://forum.productcart.com/forum_posts.asp?TID=5184
Printed Date: 22-December-2024 at 1:39am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Moving Hosts - DB connection issue
Posted By: got2know
Subject: Moving Hosts - DB connection issue
Date Posted: 21-June-2012 at 9:44pm
Hi,

ProductCart v3.51a 

We are planning a move from our current server/host to a new host/server.  

We are going through a test right now.

The new site seems to still be pulling the database data from the current server.  We thought that the file to change all the connection strings was /includes/storeconstants.asp.  However, that file seem to have no affect on the site.  We've even deleted that file and it has no affect, so the change must need to occur somewhere else.

Any thoughts or guidance would be much appreciated!

J



Replies:
Posted By: Matt
Date Posted: 21-June-2012 at 10:01pm
That is the file.  DNS probably has not changed yet and your just looking at the old site.

This is a good reference.  Have you seen this?

http://wiki.earlyimpact.com/how_to/move_store" rel="nofollow - http://wiki.earlyimpact.com/how_to/move_store


Posted By: got2know
Date Posted: 21-June-2012 at 10:17pm
Matt,

I don't think the DNS would matter in this case.  We are connecting via an IP address not the actual domain name (it's still active and pointing to the current site).  That IP address hasn't been used for anything else - plus the HTML files are resolving to the new test server.

I did previously look at the document you referenced, but took a 2nd look, now. I didn't see anything that seems to shed light on this.  

Quite bewildering right now. I'm sure once it's figured out it will make sense, though.

John

 


Posted By: Greg Dinger
Date Posted: 21-June-2012 at 10:26pm
John - I have seen sites that were altered by coders who did not understand the application structure.  In one case, the db connection was moved out to another file. 
 
I'd suggest going to any page, let's say viewcategories.asp and examine the included file references.  Poke around and see if you can find another db connection.  it's going to be there somewhere.


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: got2know
Date Posted: 21-June-2012 at 10:33pm
Greg - Thanks.  I previously did a search for the DB username in the source code of the files to see if it was somewhere else.  I came up empty.  But your idea definitely has merit.  I'll search for the db name, too.

J


Posted By: Guests
Date Posted: 21-June-2012 at 11:30pm
I'd expect that the location of the SQL server would be different (or if using a DSN, maybe it would have a different name), so to check that you're hitting the new db, try this:

In viewcategories.asp, find:
'// Page Count
iCategoriesPageCount=rs.PageCount
Just above that, look for something like the following (stock PC line):
rs.Open query, conntemp, adOpenStatic, adLockReadOnly, adCmdText
In this case, "conntemp" is the db connection string. As per Greg's comment, this connection string might have been changed to some other constant. What'ever constant you find there, try adding the following just above it (again using the stock PC constant name here):
response.write("conntemp=") & conntemp
response.end
Then hit viewcategories.asp directly in your browser (the above will only show on the "no parent") category page, not any other category/sub-category page.

This will show you the db connection string being used here. Compare that with the new host location and what you have in storeconstants.asp. If it's different, then you should be able to trace it down from there relatively easily. If it's the same, then you'd need to try the same sort of thing on a db call that's directly related to whatever data appears to be coming from the legacy location rather than the new one.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net