Zen Cart Logo
Forums / Basic Configuration / Changing domain address on cart

Changing domain address on cart

Locked

Views: 2,589

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
16 Jul 2007, 6:04 PM
#1
irrugly avatar

irrugly

New Zenner

Join Date:
Apr 2007
Posts:
25
Plugin Contributions:
0

Changing domain address on cart

When I initially installed the shop I set it up for 1 domain to build the template.. example.

https://www.testing.net

Then after I had it in the works I purchased the domain it will be linked to. Now if I take the original domain off of my host and replace it with the new one. How do I go about converting the store over to the new domain?

16 Jul 2007, 6:40 PM
#2
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Changing domain address on cart

Just copy all files to the new domain and alter the config files (for the Admin and the Catalog) to the new paths on the new server.

That should do that part.

If you are on a new server, and you have also moved the Database (MySQL) then you will need to either re-install the cart to set that up again, or make a backup of your current DB and import that into the new one.

If you are going to be using the same database (host that is) then you should just copy and paste the full cart over to the new domain, then alter the configs as indicated above, and you're all set.

16 Jul 2007, 6:45 PM
#3
irrugly avatar

irrugly

New Zenner

Join Date:
Apr 2007
Posts:
25
Plugin Contributions:
0

Re: Changing domain address on cart

Well really im on the same server, the only thing thats changed is that I removed my old domain from the site and attached the new one. I had them both on the site for a time, but I need to get everything unlinked from my old one.

Are there specific files I need to change? its still the same database etc etc.

16 Jul 2007, 6:55 PM
#4
kuroi avatar

kuroi

Totally Zenned

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

Re: Changing domain address on cart

In that case you need change only the domain name in the includes/configure.php (2 changes) and admin/includes/configure.php (4 changes) files.

16 Jul 2007, 7:45 PM
#5
irrugly avatar

irrugly

New Zenner

Join Date:
Apr 2007
Posts:
25
Plugin Contributions:
0

Re: Changing domain address on cart

Thank you two very much! Saved me a lot of time digging around trying to find it after work.

17 Jul 2007, 1:31 AM
#6
irrugly avatar

irrugly

New Zenner

Join Date:
Apr 2007
Posts:
25
Plugin Contributions:
0

Re: Changing domain address on cart

The only problem im having now. I have quite a few random scripts that were linked to my old domain address. I updated the scripts to the new url.. code wise nothing has changed except I changed all the url's in the appropriate places. The pages that load those scripts load extremely slow and it shows up with this error

Warning: main(http://www.expletivelydeleted.com/shop/rotater_a.php%29: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /home/content/b/r/a/expletivelydeleted/html/shop/ includes/templates/monkey/templates/tpl_contact_us_default.php on line **5

**Anyone have any ideas why this is happening?

17 Jul 2007, 10:44 AM
#7
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Changing domain address on cart

Sounds like you missed re-configuring that program "rotator_a.php" for the new domain.

Failed to open stream means it can't find the location (thus the "500 server error".)

I would check out that program and make sure you not only configured it for the new domain, but have moved all associated files that are used to run it to the new domain as well.

17 Jul 2007, 2:43 PM
#8
irrugly avatar

irrugly

New Zenner

Join Date:
Apr 2007
Posts:
25
Plugin Contributions:
0

Re: Changing domain address on cart

I double checked my configure files as well as my scripts and the other files to double check all the links.

When I try to manually go to the php file.

http://www.expletivelydeleted.com/shop/rotater_a.php

I get this page.
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

Nothing has changed in any of the files except I replaced my old domain name with my new. All the links are still the same, the structure is all the same.

Im not getting a 404 not found error so its seeing the file, its just not allowing the script to run. The only settings I changed on my host was that I pulled my old domain off. It was always a secondary domain anyhow.

Any suggestions?

Update:: If I make a subdirectory in the /shop directory then the script will process. is there any reason why this would be?

18 Jul 2007, 1:36 PM
#9
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Changing domain address on cart

Again, it sounds like a configuration issue with that program alone. I would assume that during some kind of "setup/installation" of that program (the Ad Rotator), it was asked for a "path" to either the database and / or the file itself.

The path may have been coded as "../[rest of path here]" or something similar. Likewise, it may have saved the entire url of the old domain as part of that setup.

In either of the cases, it will not work unless you exactly replicate the directory structure of the previous domain, and also make sure the configuration of each program points properly to the area it needs in order to work.

Make sense?

It is without a doubt a configuration issue still. I would check paths etc... as proven by you being able to get it working through creating a sub-directory.

Also, check to see if the permissions are set identically for the new domain (as the old domain). It could be that the program in question requires certain permissions set in order for it to run.

18 Jul 2007, 4:25 PM
#10
irrugly avatar

irrugly

New Zenner

Join Date:
Apr 2007
Posts:
25
Plugin Contributions:
0

Re: Changing domain address on cart

Well lets see how we can describe this. My host is with godaddy, which is just up in the air right now till my store is finished then ill find a real host. Anyways. All I did was remove one domain and reset a new domain to the server. So in essence the file structures are identical, no paths changed.

My rotator scripts have no paths, there was no install, the script is

<?
@srand((double)microtime()*1000000);
function bannerG($select, $host, $host2)
{
$attempted = true;
$lines = @file("rotater_a.txt");
$count = @count($lines);
$random = @rand(0,$count-1);
$selected = $lines[$random];
$pieces = @explode(",", $selected);
$max_attempts = 3;
$attempts = 0;

IF ($host == $pieces[0] AND $attempts <= $max_attempts OR $host2 == $pieces[0] AND         $attempts <= $max_attempts) {
++$attempts;
bannerG ("display", $host, $host2);
}

ELSE {
echo ("<center><A HREF=\"$pieces[0]\"><IMG SRC=\"$pieces[1]\" BORDER=0 class='productrandomimage'></A></center>");
}

}
$host = "http://" . $_SERVER[HTTP_HOST];
$host2 = str_replace("www.","",$host);
IF (!isset($attempted))
{
bannerG ("display", $host, $host2);
}
?>

It links to a text file that just has a link, image file. Ive tested both of the urls and both link and image show up perfectly. It worked fine prior to me changing the domains. Im not sure what changed that is breaking these.

18 Jul 2007, 11:20 PM
#11
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Changing domain address on cart

You mention that the program links to a text file. I would assume that it also then need to READ (and maybe WRITE) to that text file using the fopen command (or something like that.

If that is the case, you may want to make sure that you have the proper permissions set on that in order to be able to OPEN the text file, READ from it, and then CLOSE it again. If needed, even WRITE to it.

The difference still sounds like a permission issue to me. All other portions seem consistent from site to site.