Forums / General Questions / moving to a new server

moving to a new server

Views: 1,608

Results 1 to 18 of 18
5 May 2012, 11:16 AM
#1
raf696 avatar

raf696

New Zenner

Join Date:
May 2010
Posts:
58
Plugin Contributions:
1

moving to a new server

Hello, I want to move my zen cart to a new server, thy moved the account and now I keep getting the install page, so I follow the info to the end and then it takes me back to the fist install page.
Any help or advice please. Thank you

6 May 2012, 10:20 AM
#3
raf696 avatar

raf696

New Zenner

Join Date:
May 2010
Posts:
58
Plugin Contributions:
1

Re: moving to a new server

Hi thanks for that. all works now but just one thing in the url now it is displaying my domain username
url eg: https://www.yourdomain.com/~username/index.php

8 May 2012, 8:53 AM
#4
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: moving to a new server

raf696:

Hi thanks for that. all works now but just one thing in the url now it is displaying my domain username
url eg: www.yourdomain.com/~username/index.php

This URL is something that some hosts will supply so that you can work on/access a site whilst the domain name is being setup/propagated.

I would assume that this is what you entered (or what got entered) into the two zencart configure files. These will need to be changed to point to your real domain name.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

10 May 2012, 12:38 PM
#5
raf696 avatar

raf696

New Zenner

Join Date:
May 2010
Posts:
58
Plugin Contributions:
1

Re: moving to a new server

Hi where can I find this info to change, would it be under confi.php

10 May 2012, 12:44 PM
#6
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: moving to a new server

raf696:

Hi where can I find this info to change, would it be under confi.php

/renamedAdmin/includes/configure.php &
/includes/configure.php

You shouldn't need to change anything except the two lines in each

define('HTTP_SERVER', 'http:/your_domain.name') ; and
define('HTTPS_SERVER', 'http:/your_domain.name') ;

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

10 May 2012, 12:49 PM
#7
raf696 avatar

raf696

New Zenner

Join Date:
May 2010
Posts:
58
Plugin Contributions:
1

Re: moving to a new server

I have that in there but there is something missing under

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '//');
define('DIR_WS_HTTPS_CATALOG', '//');

as when loadint the site I get this now
https://www.mydomain.com//index.php?

10 May 2012, 12:58 PM
#8
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: moving to a new server

raf696:

I have that in there but there is something missing under

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '//');
define('DIR_WS_HTTPS_CATALOG', '//');

as when loadint the site I get this now
www.mydomain.com//index.php?

I've NO idea how you managed to get two // in there. There should only be one in each (or, if your store is located in a different folder than /public_html/
such as /public_html/store/ then these would be define('DIR_WS_HTTP_CATALOG', '/store/');

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

19 May 2012, 4:48 AM
#9
ak6000 avatar

ak6000

Zen Follower

Join Date:
Apr 2010
Posts:
102
Plugin Contributions:
0

Re: moving to a new server

Hi Folks,

I am trying to move my zen cart v1.3.9 from one hosting package to another with more space on Linux OS. I have followed the instruction on how to do this exacltly as documented.

Per instruction, I have dropped all tables in my new site and tried to upload my backup DB to the server. But when I press Go on the PhpMyAdmin I get the this error:

"There is a chance that you may have found a bug in the SQL parser. Please examine your query closely, and check that the quotes are correct and not mis-matched. Other possible failure causes may be that you are uploading a file with binary outside of a quoted text area. You can also try your query on the MySQL command line interface. The MySQL server error output below, if there is any, may also help you in diagnosing the problem. If you still have problems or if the parser fails where the command line interface succeeds, please reduce your SQL query input to the single query that causes problems, and submit a bug report with the data chunk in the CUT section below:"

"MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PK' at line 1 "

I am not a SQL DBA and I am totally lost:( I appreciate any help you can give me.

19 May 2012, 5:20 AM
#10
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: moving to a new server

ak6000:

"MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PK' at line 1 "

"PK" is the first two characters of a .zip file. So this means one of two things.

  1. The .zip file itself is invalid (a bad download perhaps) or
  2. There is something amiss with you phpmyadmin/server setup that is preventing the file from being unzipped prior to the import.

Solution. First check that the zip file is valid by unzipping on your local machine. If you get an error you'll need to re-export the data (hopefully you still have access to your original database) .
If the file unzips without any errors you can bypass the phpmyadmin/server problem by importing the unzipped file.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

19 May 2012, 3:44 PM
#11
ak6000 avatar

ak6000

Zen Follower

Join Date:
Apr 2010
Posts:
102
Plugin Contributions:
0

Re: moving to a new server

RodG:

"PK" is the first two characters of a .zip file. So this means one of two things.

  1. The .zip file itself is invalid (a bad download perhaps) or
  2. There is something amiss with you phpmyadmin/server setup that is preventing the file from being unzipped prior to the import.

Solution. First check that the zip file is valid by unzipping on your local machine. If you get an error you'll need to re-export the data (hopefully you still have access to your original database) .
If the file unzips without any errors you can bypass the phpmyadmin/server problem by importing the unzipped file.

Cheers
Rod

Rod,

Thanks so much for prompt reply.

I unzipped the SQL file without any problem and tried to upload with compression set to none.

I believe the upload went fine, since server was busy for few minutes and then I got the following error message:

Error

**SQL query:

-- phpMyAdmin SQL Dump
-- version 2.6.4-pl3
-- http://www.phpmyadmin.net

-- Host: dbxxxx.perfora.net
-- Generation Time: May 15, 2012 at 09:09 PM
-- Server version: 5.0.91
-- PHP Version: 5.3.3-7+squeeze9

-- Database: dbxxxxxx844

CREATE DATABASE dbxxxxxx844 DEFAULT CHARACTER SET latin1 COLLATE latin1_german2_ci

MySQL said: Documentation
#1044 - Access denied for user 'dboxxxxxx345'@'%' to database 'dbxxxxxx844' **

Please note that I did not know from security perspective it is OK to display my full DB and host name so I replaced few numbers with "x".

Also, I am the admin on my hosting server and, as far as I know, I am signing in to PhpMyAdmin as admin as well.

19 May 2012, 4:09 PM
#12
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: moving to a new server

ak6000:

**
CREATE DATABASE dbxxxxxx844 DEFAULT CHARACTER SET latin1 COLLATE latin1_german2_ci
MySQL said: Documentation
#1044 - Access denied for user 'dboxxxxxx345'@'%' to database 'dbxxxxxx844' **

Curious. A typical phpmyadmin export doesn't include a 'CREATE DATABASE' statement, so what is happening here is the import is trying to create one but you don't have permission to do so. Also, you wouldn't/shouldn't be needing to create a NEW database anyway because you are supposed to be inserting the data into an existing database (which may or may not have the same name as the original database).

Anyway, the solution is quite simple. Using a text editor, delete the line in your .sql file (the one you are trying to import) that has this CREATE DATABASE command. Save the file and try again. (note: you will need to select your database in phpmyadmin before doing an import (just in case it isn't obvious).

There will only be one line with the CREATE DATABASE command, and that will be very near the beginning of the file.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

20 May 2012, 4:45 AM
#13
ak6000 avatar

ak6000

Zen Follower

Join Date:
Apr 2010
Posts:
102
Plugin Contributions:
0

Re: moving to a new server

Man you're a lifesaver! That was the problem and I was able to finally move my site:smile:

Thanks so much for your help.

Just to learn what happened here, why the backed up DB had the Create DB line in it? Did I do something wrong when I was backing up my DB? I used the link in Zen cart Q&A (https://www.zen-cart.com/content.php?144-how-can-i-do-a-database-backup-with-phpmyadmin) to backup my DB.

20 May 2012, 4:53 AM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: moving to a new server

Yes, you skipped steps 2 and 3 about FIRST selecting your database from the list BEFORE choosing to export. Thus it assumed you wanted not just the contents but the database frame too.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

20 May 2012, 5:28 AM
#15
ak6000 avatar

ak6000

Zen Follower

Join Date:
Apr 2010
Posts:
102
Plugin Contributions:
0

Re: moving to a new server

That makes sense.

Thanks for the hint.

20 May 2012, 6:27 AM
#16
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: moving to a new server

ak6000:

Just to learn what happened here, why the backed up DB had the Create DB line in it? Did I do something wrong when I was backing up my DB? I used the link in Zen cart Q&A (www.zen-cart.com/content.php?144-how-can-i-do-a-database-backup-with-phpmyadmin) to backup my DB.

I can't say if you did anything wrong or not, but what I can say is:


  1. Open phpMyAdmin
  2. Select your database from the dropdown (usually on the left side), so that its tables are displayed (they usually display on the right side).
  3. Click on the Export tab. (NOTE: Be sure you've already selected your database from the pulldown BEFORE clicking on the Export tab)

If you didn't follow step#2 (and the NOTE: in step#3) then phpmayadmin will include the CREATE DATABASE command.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

20 May 2012, 6:06 PM
#17
ak6000 avatar

ak6000

Zen Follower

Join Date:
Apr 2010
Posts:
102
Plugin Contributions:
0

Re: moving to a new server

I believe that's the reason.

Thanks for your help.