Print Page | Close Window

Moving from shared hosting to VDS

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=5090
Printed Date: 26-June-2024 at 4:34am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Moving from shared hosting to VDS
Posted By: Ludwig
Subject: Moving from shared hosting to VDS
Date Posted: 09-April-2012 at 5:47am
So I'm trying to move from shared hosting to a Virtual Dedicated Server... I moved over the PC dir to my new server.... then backed up the database and restored it using SQL Management Studio... I then edited the storeconstants.asp file below with my new server info but I am getting a Database Connection Problem... is there something else I need to do? I am using the same CrypPass that's on the current live site I'm trying to move and I'm trying to access the moved site on the new server via a temporarily different domain name.

<%private const scCrypPass="**********************************************"
private const scDSN="Provider=sqloledb;Data Source=localhost;Initial Catalog=ProductCart;User Id=DB-USERNAME;Password=DB-PASSWORD"
private const scDB="SQL"
private const scStoreURL="http://www.newdomain.com"
%>



Replies:
Posted By: Ludwig
Date Posted: 09-April-2012 at 1:05pm
When I go to the /setup/ folder to try and use the setup wizard I get a

403 - Forbidden: Access is denied.

I have set the permissions for the entire PC dir to read/write for all IUSR's and I checked the setup folder and it has those permissions, what am I missing?



Posted By: Ludwig
Date Posted: 09-April-2012 at 4:00pm
soooooooooo frustrating when something doesn't work and it's not rocket science which is what aggravates me.


Posted By: Ludwig
Date Posted: 09-April-2012 at 8:40pm
I also set to Parent Paths Enabled... like what could be causing this??? Could it be the different domain?


Posted By: Matt
Date Posted: 09-April-2012 at 8:57pm
Did you check the wiki already?

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

If you've read this and still cannot get it, then please open a ticket.


Posted By: Ludwig
Date Posted: 10-April-2012 at 4:08am
Yes I've only read it like 10 times now... it's not working - that means you have obviously left something out of your instructions... you don't even mention app pools or what version of asp.net you need in these instructions - no wonder I have wasted this many hours of my life trying to do something that should have taken 30 minutes.


Posted By: Hamish
Date Posted: 10-April-2012 at 4:50am
We cannot write the documentation to cover every scenario and we have never had complaints about this section before. This is mostly dependent on the server configuraton. Please raise a support ticket so we can give specific guidance once we have specific details. 

-------------
Editing ProductCart Code?

See http://wiki.earlyimpact.com/developers/editcode" rel="nofollow - WIKI Guidelines for Editing ProductCart's ASP Source Code



Posted By: Matt
Date Posted: 10-April-2012 at 5:03am
That guide has been the defacto guide for ProductCart users for the past decade. We do not mention app pools and .NET instructions because they are irrelevant to Classic ASP.  I understand you may be getting frustrated, but you have not opened a ticket.  If you open a support ticket we will have the information we need to assist you.  


Posted By: Ludwig
Date Posted: 10-April-2012 at 12:28pm
Well it seems as though something on the server isn't configured correctly and I have no idea what it could be since I've covered everything in your guides - Windows Server 2008 R2 with IIS 7.


Posted By: Ludwig
Date Posted: 10-April-2012 at 4:46pm
To note: I am trying to use SQLEXPRESS... and I am doing a DSN-less connection, I've tried just about every conceivable thing for data source including: localhost/SQLEXPRESS - the name of the sql server seems to be SQLEXPRESS and it's hosted locally and other recommendations for data source with this setup?

Provider=SQLOLEDB.1;Data Source=<COMPUTER_NAME>\SQLEXPRESS;Initial Catalog=<DATABASE_NAME>;User ID=<USER_NAME>;Password=<USER_PASSWORD>;



Posted By: cognecy
Date Posted: 10-April-2012 at 6:11pm
Ludwig,
Your connection string in general looks fine but there are more variables that need to be considered in how your server is configured, what ports are open or closed, etc.  But, that is not the real problem here.   Something that caught my eye in your post ... you are trying to use SQLExpress?????

I have posted on this topic several times before so I will summarize by saying that you should NEVER use SQL Express for a Public Facing database and certainly not for an online store.  This "recommendation" not only comes direct from Microsoft but has also been given as a "recommendation" from Early Impact in the product documentation as well as from very seasoned DBA's such as myself that have tons of experience working on and administering the ProductCart Database for hundreds of customers over the years.
 
Suffice it to say that SQL Express is meant as a development tool and/or as a personal 'free' database ONLY.  It uses the same engine as the full blown version but it is not, let me repeat ... it is NOT the same as the full version of the software.  Can ProductCart run on this platform, sure.  will it run well on this platform - absolutely not given that Express is resource limited and does not contain the management tools needed for a public facing website.  Just because you can do it, does not mean that you should do it.
 
Now with that said, running you own servers is expensive but part of that investment is making sure you have the right software for the applications you are running.  You should get with your server provider and ask them to provide you with MSSQL2008 Web Version at the very minimum.   This version is more than adequate to serve your database.  If they say they cannot provide you with this software then I would suggest you find another provider quick.  There are several of us on the forums that specialize in hosting ProductCart and offer a full range of hositng solutions (shared, VPS, dedicated, cloud, etc.)
 
On that note, and I see many people ignore this, but just in case you are setting up your servers this way .... you should not ever run your Website and your Database software on the same server (virtual or not).  Coming from the source again on this, Microsoft tells you this, Early Impact makes this "recommendation" in the documentation, and once more, DBA's such as myself are telling you this.  There are many technical reasons for this ranging from competing bandwidth and resource sharing but if you are ever looking towards PCI Compliance, the requirement states pretty clearly (although some may try to argue the point when there is nothing to argue) that your website, database and DNS servers need to be separate resources.   Not going to debate PCI here and I offer that tidbit only to show there are all kind of experts out there, myself included, that are telling people not to do these things.  It is for good reason. 

-----
 
Unfortunatly that is about as far as I can go on this topic primarily because in good concience, I cannot assist any users that are using or want to use SQL Express as their stores database.  This is nothing personal but rather that I have had to move quite a few databases where customers been using Express and end up having problems.  I just made it my own company policy not to work on SQL Express installations unless we are moving them out of that setup.
   
 


-------------
Mark Shipp
Cognecy Solutions, LLC
Hosting/Design/Customization/Database Migration
www.cognecy.com
www.cognecy.co.uk


Posted By: ProductCart
Date Posted: 10-April-2012 at 6:11pm
One other thing to try if you are receiving the 'generic' database connection error (which is likely suppressing the actual/real error). Try applying the Code Debugging tip for the Control Panel as detailed in the following WIKI article:

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

That might allow the raw error to be shown.


-------------
The ProductCart Team

Home of ProductCart http://www.productcart.com" rel="nofollow - shopping cart software


Posted By: Ludwig
Date Posted: 10-April-2012 at 7:06pm
I've never run the store on SQL Express but since getting a Virtual Dedicated Server, I was trying to see if it would work even though I know everyone recommended against it, so I will try to buy a better version and see how that goes. And also, I will use that link that's exactly what I am been looking for.


Posted By: Ludwig
Date Posted: 10-April-2012 at 7:18pm
So if you recommend to have the database hosted separate from my store, what about just leaving my database on the shared hosting and accessing it from there? So my store files would be on the Virtual Dedicated Server and I would use a connection string that pulled the database from my current shared hosting account. Would that be a problem? Please say it will work, that will be so easy and cheap and I won't have to use buy SQL Server which is EXPENSIVE.


Posted By: cognecy
Date Posted: 10-April-2012 at 8:01pm
That is perfectly acceptable.  I have done that with many of my own customers that could not afford 2 VPS servers.  You will also get the benefit of a beefier server using the Host's shared server.

-------------
Mark Shipp
Cognecy Solutions, LLC
Hosting/Design/Customization/Database Migration
www.cognecy.com
www.cognecy.co.uk


Posted By: Ludwig
Date Posted: 10-April-2012 at 9:48pm
Well, it worked, unbelievable... I simply setup a new database on my shared hosting restored a backup of my PC database and went to the URL from my admin hosted on my VPS and BAM! Loaded right up. The new problem is that it will not accept my login and I'm 100% positive it's the same username and password from my live site, is there a reason for this? And if I click forgot password and put the main numerical admin name it says not found, don't know if this is because of the different domain or what but the login definitely doesn't work.


Posted By: Ludwig
Date Posted: 10-April-2012 at 9:54pm
Edit


Posted By: cognecy
Date Posted: 10-April-2012 at 10:29pm
You did not really specify this was a separate shared hosting account ... was assuming that you had a control pane that allowed you to establish a DB on either your server or the shared server.  I am assuming the shared account and your Servers are being supplied by the same company/host?  If so then it really should not matter.  As long as you have the server alias (e.g.  sql.somecompany.com) the DB username, and the password you can set your connection string accordingly.   If this is your scenario then you need to contact the hositng provider and have them assist you with connections.  It may be as simple as allowing the IP of your VPS server on the SQL server. 
 
If your server and your shared hosting account are from two completely different hosts you might not be able to connect depending on restrictions on either side.  Also if they are different hosts your lag time will be so incredibly slow it is not worth it (due to sending requests across two different networks)
 
I think either way when it comes to connecting it is best to contact the host. 


-------------
Mark Shipp
Cognecy Solutions, LLC
Hosting/Design/Customization/Database Migration
www.cognecy.com
www.cognecy.co.uk


Posted By: Ludwig
Date Posted: 10-April-2012 at 10:49pm
Well we are connecting fine, but the login on the admin panel isn't the same as the main site, is there a reason for that? We are using a subdomain of the live site's domain on the VPS which the new store will be hosted on, but I know for 100% the same login pass for the live site is not working on the VPS store and I just backed up the live database and restored it directly to a shared hosting account which is the same provider as the VPS.

I'm not sure if moving this means I need a new encryption key for the store constants or what, but it won't login even though it will display the admin login page fine which it didn't do before.


Posted By: Ludwig
Date Posted: 11-April-2012 at 9:05am
my current live site is using MS SQl 2005 and I restored the database to MS SQL 2008 could that have messed up the login/pass to the admin somehow? I don't understand why it won't let me login, even using the retrieve login or password says the admin email which I know is the one on the live site is not valid.


Posted By: Ludwig
Date Posted: 11-April-2012 at 5:59pm
so how do I login to the admin panel if the login pass doesn't work and the retrieve pass doesn't work because it won't recognize the admin email or username?


Posted By: Greg Dinger
Date Posted: 11-April-2012 at 6:30pm
You probably need to engage a competent developer to help, or submit a support request to Early Impact.  There are ways that one can overcome your issue but it is reliant upon having FTP access.

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

Certified ProductCart Developer

Web Design/Development/Hosting

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


Posted By: Ludwig
Date Posted: 11-April-2012 at 7:08pm
but is it normal to move a database then have the admin login not work? I don't understand how it's possible... created a new database, then restored this database from the live site, the admin page loads fine but login/pass will not work.


Posted By: Greg Dinger
Date Posted: 11-April-2012 at 7:22pm
From the outside looking in, we cannot tell what you may have done.  Start with the idea that despite cautions not to use SQL Express, you plowed ahead and tried it anyhow.  Apparently you are spread out over a pair of data centers?  Now you have this.  It's hard, based on everything one can glean from this thread just what you did or did not do, and how you ended up where you're sitting now. 
 
I'd recommend you contact Mark @ Cognecy and see if he can dig you out of this mess.  How much time is it worth spending before it's justified to spend a couple bucks so you can move on?
 
And as for your trying to use Express because you didn't want to buy the full license, at any of the shops that commonly host PC stores, I'm not aware of anyone that charges for a database license.  That's all built into our VPS hosting fees.  I'd be curious about the bigger picture, or you could share that with Mark, as there may be options that would be in your best interest to consider. 


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

Certified ProductCart Developer

Web Design/Development/Hosting

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


Posted By: Ludwig
Date Posted: 11-April-2012 at 7:48pm
I know it's not about the money, I am trying to learn how to do things myself. I taught myself how to setup the server, I've done everything so far... installed a Wordpress site on a windows server, vBulletin forum, CMS software, installed PHP, created SQL and MySQL dB's, generated SSL certificates, setup IIS for all the sites, a bunch of other stuff, I haven't really had many issues with anything else.

I just want to educate myself, because I prefer to be independant, it's much more rewarding that way.

I've always used shared hosting in the past and when I bought the first VPS, it was so liberating. I could just do a remote login and use it like a computer. The feeling of going from shared hosting to a VPS is comparable to moving out of your parent's house for the first time and being on your own. It's a good feeling. :)


Posted By: Greg Dinger
Date Posted: 11-April-2012 at 7:57pm
fair enough, and when I started this business, I made the same choice.  I re-sold shared hosting accounts for a year or so until I could justify my own servers.  Now I wouldn't go back - and it's one of the reasons I won't deal with stores hosted at places like Godaddy - I don't want to have to deal with some tech support dweeb and teach them how to do the stuff I need done, and which I know implicitly. 
 
Problem is that without one of us having access to you on the phone, an FTP login, and some questions answered privately, I don't know what else we can do here.  The key to security is just that - and you are now asking us to speculate publicly why you cannot get logged in.  The questions we need to ask, and the steps needed to resolve this, need to be performed outside of the forum. 
 
You just need to decide who is going to help you through this, and since I'm a bit tied up at the moment, I'm suggesting that be Mark or EI support.   Or look to the CPD list and find another certified developer.  But at the momnet you really do need private assistance to get you through this one...


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

Certified ProductCart Developer

Web Design/Development/Hosting

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


Posted By: Ludwig
Date Posted: 12-April-2012 at 5:01am
Ok this is just bizarre, I made a new database... without importing/restoring any of my PC data - then I put the connection string in storeconstants on my VPS store to this new database that has no PC data in it at all, and the admin page will still load! To make sure I was connecting to this new database and not the live database, I removed a few characters from the username and database name from the connection string and sure enough I reloaded and got the cannot connect to the database error.

Is this odd or what? I must not be connecting to the database and that's why the login doesn't work, but why does the admin page login still load?


Posted By: Ludwig
Date Posted: 12-April-2012 at 5:11am
Originally posted by Ludwig Ludwig wrote:

my current live site is using MS SQl 2005 and I restored the database to MS SQL 2008 could that have messed up the login/pass to the admin somehow?


See, I was on the right track here... I went and made a new database with SQL 2005 instead of 2008 and then restored my PC data..... and BAM! It works perfectly now. YASSSSSSSS!! It feels so GOOD when you figure something out and it works!!

So for anyone reading... if you are using MS SQL 2005 and you try to import your database into MS SQL 2008, it won't work or you will need to do extra tweaking or something, because that's what caused my problem.


Posted By: Ludwig
Date Posted: 12-April-2012 at 5:27am
I just ran the troubleshooting utility to make sure everything is configured properly, including my SSL. The only things that are missing are the two image utilities... I guess I'll install Persits Upload and Persits Jpeg (ASPJpeg). Just one last thing, I am moving from IIS6.0 on the shared hosting to IIS7.5 on the VPS, do you think there could be any issues like with the MS SQL 2005 to 2008 move?


Posted By: cognecy
Date Posted: 12-April-2012 at 11:51am
To answer your question about if there could be problems between SQL2005 and SQL2008 from going between IIS6 and IIS7.5 .... Yes there could be a Mountain problems you could encounter.  The architecture between these two platforms changed drastically and things you could do before you cannot do now... or have to be done in a different way (sorry to be talking in circles).  It is like standard and automatic transmissions on a car ... they both accomplish the same task but in drastically different ways and the technology gap between them is vast.

Like Greg, I fully appreciate you wanting to learn and to things on your own as I have spent most of my career doing much of the same however, I always kept people and experts at arms length so I could grab them when I got stuck (I still do this as I certainly have not learned all I can).
 
You really need an experienced DBA that has experience with ProductCart specifically to move things around and migrate between platforms.  I am not a fan of backup and restore myself but do need to state very clearly, that giving blanket advice to the community that it will not work is an incorrect statement.  It absolutely will work if done correctly  - but there are considerations that need to taken into account that a DBA will be able to handle. 
 
To re-cap on what Greg mentioned, we are at a point on this thread there is not much more we can do do assist primarily because it is a public forum and the questions that need asked and the access that is needed is not for public discussion.  Greg is absolutely correct in that at this point you really do need to either contact me directly (I sent you a private message with my contact info already) or submit a support ticket with Early impact and have them assist with set up. 


-------------
Mark Shipp
Cognecy Solutions, LLC
Hosting/Design/Customization/Database Migration
www.cognecy.com
www.cognecy.co.uk


Posted By: Ludwig
Date Posted: 12-April-2012 at 12:44pm
Originally posted by cognecy cognecy wrote:

I am not a fan of backup and restore myself but do need to state very clearly, that giving blanket advice to the community that it will not work is an incorrect statement.  It absolutely will work if done correctly


That's why I said.. OR you will need to do extra tweaking...

"If you are using MS SQL 2005 and you try to import your database into MS SQL 2008, it won't work or you will need to do extra tweaking or something, because that's what caused my problem."

I'm sure you can get it to work with MS SQL 2008 but probably not with a simple backup and restore, so I was just giving everyone a precaution in case they run into the same issue that I had.

If I do any mods, I plan to hire a developer, but the rest I want to try to learn myself.


Posted By: JoltDigital
Date Posted: 13-April-2012 at 1:40am
If you are restoring a backp of a db from a different server be sure to remove the orphaned sql users from the db and resolve any ownership issues from the orphaned users. You will then need to add the users you have configured on the new server to have access to the database.
 
Also if you are using mssql express make sure mixed authenication and tcpip are enabled. By default both are disabled.
 
I would also suggest you contact your host about adding a license for sql2k8r2 web edition. It should be around $20/month.


-------------
http://www.joltdigital.com/host_pc.asp - JoltDigital Inc.
1-888-785-5658
Premium ProductCart Hosting



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