Forums / Installing on a Linux/Unix Server / 2 zen carts on the same mydomain.com

2 zen carts on the same mydomain.com

Locked

Views: 3,235

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
7 Jan 2007, 6:43 PM
#1
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

2 zen carts on the same mydomain.com

Hello!

I have ZC currently running on my main site and have my test zen cart running with a different web host. Although both webhosts are Linux the are configured differently so what works on one does not work on the other.

I was thinking of placing my test zen cart on the same server as my real site running zc so they are both with the same webhost.

Is it ok to have a live site on mydomain.com and a test site on mydomain/dev ?

my ssl is secure.mydomain.com

I would use separate databases of course.

I am new to ecommerce carts and php/mysql

Is this a good or bad idea?

any suggestions? or no-nos?

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

7 Jan 2007, 7:25 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: 2 zen carts on the same mydomain.com

Yes, This is how this is done by most....

Main store normally at the root of your account and an evaluation/test account in another folder ??test - eval - or?? or in a sub-domain...

Of course with its own DB

Zen-Venom Get Bitten

7 Jan 2007, 7:39 PM
#3
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: 2 zen carts on the same mydomain.com

Great!

I thought that might be the simplest way, but was afraid of file conflicts, as I don't know much about how php files communicate to each other.

Thanks for the advice!

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

7 Jan 2007, 8:44 PM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: 2 zen carts on the same mydomain.com

Purists will throw their hands up when I say this, but in very simplistic terms the php files communicate with each other and the database by way of the includes/configure.php and admin/includes/configure.php files.

As long as these settings are defined to point to different places on your server and different databases, your two (or more) Zen Carts won't interfere with each other.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

7 Jan 2007, 9:48 PM
#5
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: 2 zen carts on the same mydomain.com

Gave it a try....using this guide:

https://www.zen-cart.com/tutorials/index.php?article=54

mydomain.com/dev files kept referencing/going back to the mydomain.com web pages.

I checked the configure files/paths...all seemed correct.

I deleted all the /dev files+db in fears it would start to corrupt my live site. I hope I haven't messed it up already.

It all seems a bit too close to home anyway. I guess I will continue to do my testing at the other webhost, or just switch hosts.

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

8 Jan 2007, 12:11 AM
#6
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: 2 zen carts on the same mydomain.com

dharma:

Gave it a try....using this guide:

https://www.zen-cart.com/tutorials/index.php?article=54

mydomain.com/dev files kept referencing/going back to the mydomain.com web pages.

I checked the configure files/paths...all seemed correct.

I deleted all the /dev files+db in fears it would start to corrupt my live site. I hope I haven't messed it up already.

It all seems a bit too close to home anyway. I guess I will continue to do my testing at the other webhost, or just switch hosts.

I gave it another shot using a different method:

https://www.zen-cart.com/tutorials/index.php?article=100

The new install worked perfectly, pages pointing to the right pages etc. after I over wrote the new install files with my live old server files/db and used the fix key cache tool, same problems of the test pages pointing to the live site:down:

what did I do wrong?

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

8 Jan 2007, 12:17 AM
#7
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: 2 zen carts on the same mydomain.com

dharma:

I gave it another shot using a different method:

https://www.zen-cart.com/tutorials/index.php?article=100

The new install worked perfectly, pages pointing to the right pages etc. after I over wrote the new install files with my live old server files/db and used the fix key cache tool, same problems of the test pages pointing to the live site:down:

what did I do wrong?
I suspect that you set it up correctly, but that you old files included your old configure.php files. So when you loaded them up, you overwrote your new configure.php files and pointed everything back to your old site.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

8 Jan 2007, 1:45 AM
#8
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: 2 zen carts on the same mydomain.com

I tried it again, and the /dev index page loads correctly and all the links point to /dev/images etc..., once I click a link and move to another page I am still in /dev but all the links point to the live pages at mydomain.com

Here are my configs: is there a obvious error?

admin/includes:
define('HTTP_SERVER', 'http://mydomain.com');
define('HTTPS_SERVER', 'https://secure. mydomain.com/dev1');
define('HTTP_CATALOG_SERVER', 'http://mydomain.com');
define('HTTPS_CATALOG_SERVER', 'https://secure. mydomain.com/dev1');

define('DIR_WS_ADMIN', '/dev1/admin/');
define('DIR_WS_CATALOG', '/dev1/');
define('DIR_WS_HTTPS_ADMIN', '/admin/');
define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_FS_ADMIN', '/xxx/xxx/user/www/dev1/admin/');
define('DIR_FS_CATALOG', '/xxx/xxx/user/www/dev1/');

includes/configure:
define('HTTP_SERVER', 'http://mydomain.com');
define('HTTPS_SERVER', 'https://secure. mydomain.com/dev1');

define('DIR_WS_CATALOG', '/dev1/');
define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_FS_CATALOG', '/xxx/xxx/user/www/dev1/');

I have tried adding /dev1 to a few defines, and a page loads bit with no stylesheet

I have Ultimate_SEO_URLs installed, could that be this issue?

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

8 Jan 2007, 2:11 AM
#9
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: 2 zen carts on the same mydomain.com

I've indicated some corrections below for the admin/includes/ files

define('HTTP_SERVER', 'http://mydomain.com');
define('HTTPS_SERVER', 'https://secure. mydomain.com'); <-- should not have /dev1
define('HTTP_CATALOG_SERVER', 'http://mydomain.com');
define('HTTPS_CATALOG_SERVER', 'https://secure. mydomain.com'); <-- should not have /dev1

define('DIR_WS_ADMIN', '/dev1/admin/');
define('DIR_WS_CATALOG', '/dev1/');
define('DIR_WS_HTTPS_ADMIN', '/dev1/admin/');
define('DIR_WS_HTTPS_CATALOG', '/dev1/');

define('DIR_FS_ADMIN', '/xxx/xxx/user/www/dev1/admin/');
define('DIR_FS_CATALOG', '/xxx/xxx/user/www/dev1/');

and for the includes/ file> define('HTTP_SERVER', 'http://mydomain.com');

define('HTTPS_SERVER', 'https://secure. mydomain.com'); <-- should not have /dev1

define('DIR_WS_CATALOG', '/dev1/');
define('DIR_WS_HTTPS_CATALOG', '/dev1/');

define('DIR_FS_CATALOG', '/xxx/xxx/user/www/dev1/');

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

8 Jan 2007, 2:46 AM
#10
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: 2 zen carts on the same mydomain.com

Thank you for your corrections. Unfortunately the issue still exists:sadwalk: . I compared your corrections with my live site configs, everything looks right, I am at a loss.

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

8 Jan 2007, 3:07 AM
#11
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: 2 zen carts on the same mydomain.com

Not sure if this helps:

in view source on the url /dev1 main page displays:

<base href="http://mydomain.com/dev1/" />

next url /dev1 page displays

<base href="http://mydomain.com/" />

then the url changes to mydomain.com

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

8 Jan 2007, 9:56 AM
#12
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: 2 zen carts on the same mydomain.com

This is bread and butter stuff for Zen Cart so there will be a simple answer of the "how didn't I spot that sooner" type at the end of this.

Could you download your user/www/dev1/includes/configure.php file. Edit out your database user name and password and post the result. If your sensitive about the domain name etc. you may prefer to send it to me as a private message, though as long as the user name and password are blotted out, there shouldn't be a security problem.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

9 Jan 2007, 3:51 PM
#13
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: 2 zen carts on the same mydomain.com

While working on this issue, my site disappeared and listed internal error 500:yuck:

I believe that the problem for me is the mod: Ultimate_SEO_URLs and the URL rewriting from the root on up, thus confusing or rewriting the /dev1 test site.

I will revist this when I have more info, but I have to say as a web novice, although it seems like a good idea..... testing on same location as live site is too close to home, that a mistake can effect the main site. Even if I had set everything up right, I could see working late one night and editing the wrong folder and messing up the live site. I am going to look into testing on my local computer or setting up another domain as a test site.

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41