ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Using ProductCart
  New Posts New Posts RSS Feed - Moving Hosts - DB connection issue
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Moving Hosts - DB connection issue

 Post Reply Post Reply
Author
Message
got2know View Drop Down
Newbie
Newbie


Joined: 21-June-2012
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote got2know Quote  Post ReplyReply Direct Link To This Post Topic: Moving Hosts - DB connection issue
    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
Back to Top
Matt View Drop Down
Moderator Group
Moderator Group


Joined: 20-July-2006
Location: United States
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote Matt Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
got2know View Drop Down
Newbie
Newbie


Joined: 21-June-2012
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote got2know Quote  Post ReplyReply Direct Link To This Post 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

 
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
got2know View Drop Down
Newbie
Newbie


Joined: 21-June-2012
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote got2know Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.048 seconds.