Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

copy OSC from one domain to another with a differnent hosts and databases


Shimizoki

Recommended Posts

Posted

I have OSC currently running on www.Domain1.com/order/. I would like to know how to move the database to www.Domain2.com/CompanyName/order/

Not only am I changing the domain name, but I am also changing the webhost that I was using, that means that I will also have a different database name aswell.

 

Domain1 file layout: (path in the FTP)

/httpdocs/order/

 

Domain2 file layout: (Path in the FTP)

/www/CompanyName/

 

I made the assumption that if I moved the database to: (from Domain1 to Domain2)

/www/CompanyName/httpdocs/order/

 

That it would work. After some searching I found that I also need to change the configure.php file also. I followed the guidelines on http://www.oscommerce.com/forums/index.php?sho...database+server but I still am having some troubles.

 

My configure.php file is in this location:

/www/CompanyName/httpdocs/order/includes/

 

And it looks like this:

<?php
 define('HTTP_SERVER', 'http://www.Domain2.com');
 define('HTTPS_SERVER', 'https://www.Domain2.com');
 define('ENABLE_SSL', false);
 define('HTTP_COOKIE_DOMAIN', 'www.Domain2.com');
 define('HTTPS_COOKIE_DOMAIN', 'www.Domain2.com');
 define('HTTP_COOKIE_PATH', '/CompanyName/httpdocs/order/');
 define('HTTPS_COOKIE_PATH', '/CompanyName/httpdocs/order/');
 define('DIR_WS_HTTP_CATALOG', '/CompanyName/httpdocs/order/');
 define('DIR_WS_HTTPS_CATALOG', '/CompanyName/httpdocs/order/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', '/home/content/CompanyName/httpdocs/order/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 define('DB_SERVER', 'localhost');
 define('DB_SERVER_USERNAME', 'Database User Login');
 define('DB_SERVER_PASSWORD', 'Database User Password');
 define('DB_DATABASE', 'Database Name');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');
?>

 

DIR_FS_CATALOG - This I think is wrong, i have changed it between about 20 different combinations of home/content, home/FTP Username/, home/Domain2/, etc. with no avail

 

After this is completed when I try to access the www.Domain2.com/CompanyName/Order/ I get the error:

Fatal error: Call to a member function add_current_page() on a non-object in /home/FTP UserName/public_html/CompanyName/httpdocs/order/includes/application_top.php on line 312

 

Application_top.php (Line 312 is the LAST line)

// navigation history
 if (tep_session_is_registered('navigation')) {
if (PHP_VERSION < 4) {
  $broken_navigation = $navigation;
  $navigation = new navigationHistory;
  $navigation->unserialize($broken_navigation);
}
 } else {
tep_session_register('navigation');
$navigation = new navigationHistory;
 }
 $navigation->add_current_page();

 

When I try to access www.Domain2.com/CompanyName/Order/ I get the error:

Warning: require(includes/application_top.php) [function.require]: failed to open stream: No such file or directory in /home/FTP UserName/public_html/CompanyName/httpdocs/order/admin/index.php on line 13

Warning: require(includes/application_top.php) [function.require]: failed to open stream: No such file or directory in /home/FTP UserName/public_html/CompanyName/httpdocs/order/admin/index.php on line 13

Fatal error: require() [function.require]: Failed opening required 'includes/application_top.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/FTP UserName/public_html/CompanyName/httpdocs/order/admin/index.php on line 13

 

index.php Line 13

require('includes/application_top.php');

 

I'd like to get this up and running shortly, any help would be greatly appreciated.

Thank you all.

Posted
copy OSC from one domain to another with a differnent hosts and databases
using phpmyadmin, you can download the mysql table from server, as for files you can move them using ftp client. simply after you will need to modify the configure.php

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Posted
using phpmyadmin, you can download the mysql table from server, as for files you can move them using ftp client. simply after you will need to modify the configure.php

 

I have moved the files already, as for the table, I had to create a new one. My problem though is configuring the configure.php to look in the right places for the new database.

Unless I am misunderstanding a step. I think my only problem is the .php file

Posted
I have moved the files already, as for the table, I had to create a new one. My problem though is configuring the configure.php to look in the right places for the new database.

Unless I am misunderstanding a step. I think my only problem is the .php file

 

have you updated the the /catalog/admin/includes/configure.php file? as it seems to me from your errors in the first post, you need to update the path in admin configure.php file

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Posted
have you updated the the /catalog/admin/includes/configure.php file? as it seems to me from your errors in the first post, you need to update the path in admin configure.php file

 

Sorry for the delayed response,

 

No I did not update that file, I failed to realize that there was multiple configure.php files (How many are there?)

 

Doing what you said I am now much closer, this time the problem may be a bit harder to determine though.

 

For the sake of me typing everything out 100 times i'm going to use a few variables if you don't mind.

OSC_Path1 = 'Domain2/Catalog'

Site_Path1 = 'Domain2.com/Catalog/'

OSC_Path2 = 'Domain2/CompanyName/httpdocs/order'

Site_Path2 = 'Domain2.com/CompanyName/httpdocs/order'

 

I currently have OSC installed twice on this domain.

I wanted OSC on Domain2 so that i could test drive and find out how it worked a bit before i moved on. (OSC_Path1)

the second installation is copied over from Domain1 and is in in the file specified above (OSC_Path2)

 

Now is where my new problem comes in, I have updated the OSC_Path2/admin/include/configure.php and the OSC_Path2/include/configure.php.

 

When I go to Site_Path2/admin everything pops up as it should. (yay) I try to login using the original name and password from Domain1 but I am told the login is inncorrect. However if I am to try to login using the username and password from OSC_Path1 nothing happens (the page doesn't redirect nor am I told the password is incorrect)

 

I find this to be quite troubling. I assumed the password would be the same because i copied it over but it seems I was incorrect about that. it also bothers me that it seems to have the same password as Site_Path1 it just then doesn't actually login.

 

I'm sorry I dont have any code for you but I really dont know where I need to be looking to fix this. I assume there is some file somewhere that stores the passwords to login and that Path2 is looking at the wrong one.

 

Thanks again for any help you can provide.

Posted

Sorry I did not see an EDIT button so I had to double post.

 

 

To make life a little simpler I removed the OSC_Path1 OS Commerce. I guessed if I removed it there wouldnt be any conflicts with username and stuff. I created a new database and copied all the files that were on the original onto the new one. After I did that I was given this error.

 

Error

Fatal error: Call to a member function add_current_page() on a non-object in /home/shimizo1/public_html/Wescosa/httpdocs/order/includes/application_top.php on line 312

 

Last time I got this error I was told to change the admin/includes/config.php. This time I made sure to do that (and change includes/config.php) and I am still getting the error. Sorry that I kinda started all over again in the middle of the thread but I wasn't getting the results I needed and tred something of my own... it failed xD

 

 

includes/config.php

<?php
 define('HTTP_SERVER', 'http://Website.com');
 define('HTTPS_SERVER', 'https://Website.com');
 define('ENABLE_SSL', false);
 define('HTTP_COOKIE_DOMAIN', 'Website.com');
 define('HTTPS_COOKIE_DOMAIN', 'Website.com');
 define('HTTP_COOKIE_PATH', '/CompanyName/httpdocs/order/');
 define('HTTPS_COOKIE_PATH', '/CompanyName/httpdocs/order/');
 define('DIR_WS_HTTP_CATALOG', '/CompanyName/httpdocs/order/');
 define('DIR_WS_HTTPS_CATALOG', '/CompanyName/httpdocs/order/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', '/home/FtpUsername/public_html/CompanyName/httpdocs/order/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 define('DB_SERVER', 'localhost');
 define('DB_SERVER_USERNAME', 'Username');
 define('DB_SERVER_PASSWORD', 'Password');
 define('DB_DATABASE', 'DatabaseName');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');
?>

 

Admin/includes/config.php

<?php
 define('HTTP_SERVER', 'http://Website.com');
 define('HTTP_CATALOG_SERVER', 'http://Website.com/CompanyName/httpdocs/order');
 define('HTTPS_CATALOG_SERVER', 'https://Website.com');
 define('ENABLE_SSL_CATALOG', 'false');
 define('DIR_FS_DOCUMENT_ROOT', '/home/FtpUsername/public_html/CompanyName/httpdocs/order/');
 define('DIR_WS_ADMIN', '/CompanyName/httpdocs/order/admin/');
 define('DIR_FS_ADMIN', '/home/FtpUsername/public_html/CompanyName/httpdocs/order/admin/');
 define('DIR_WS_CATALOG', '/CompanyName/httpdocs/order/');
 define('DIR_FS_CATALOG', '/home/FtpUsername/public_html/CompanyName/httpdocs/order/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
 define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
 define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
 define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

 define('DB_SERVER', 'localhost');
 define('DB_SERVER_USERNAME', 'Username');
 define('DB_SERVER_PASSWORD', 'Password');
 define('DB_DATABASE', 'DatabaseName');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');
?>

 

Is there something else that I am missing that I might have gotten lucky and happened to change the first time on accident? Or did I change something incorrectly this time?

Posted

Try something else:

 

1) You make a totaly new osc installation

2) You download the 2 configure.php files

3) You place them into the filestructure of the store you have

4) You delete the virgin version from your server

5) You upload the complete package of the store you have to the same location as the virgin installation

Posted
Try something else:

 

1) You make a totaly new osc installation

2) You download the 2 configure.php files

3) You place them into the filestructure of the store you have

4) You delete the virgin version from your server

5) You upload the complete package of the store you have to the same location as the virgin installation

 

Actually, I have been trying something similar to that all day. It has caused me to get some errors, My difference was that i wasnt installing it to the EXACT location, but a similar one, then just changing that folder name. I'll give that a try and then get back to you guys.

Posted

Error:

 

Fatal error: Call to a member function add_current_page() on a non-object in /home/FTP UserName/public_html/CompanyName/httpdocs/order/includes/application_top.php on line 312

Fix:

 

Look at the links in my posts here: Click Me

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted
Error:

 

 

Fix:

 

Look at the links in my posts here: Click Me

 

Thanks,

 

That fixed part of my problem, now I am back to the post I made on the 25th as to where I type in the username and password and nothing happens. However if I type in the wrong username and password it tells me that its incorrect.

 

This Lets me know that it is recognizing the password, but not loading the next screen for some reason.

 

Any new ideas?

  • 3 weeks later...
Posted

Multimixer I tried exactly what you said and I still get the error I was at before where I try to login and the screen doesn't change. It seems as if this post has kinda died So I don't really expect much help anymore. I thank those of you that tried.If anyone happens to be able to fix the problem please feel free to help xD

Posted

How do I download and use it? I see in the legend that a box with a down arrow is download, but when I click on the icon to the right of "Version 2" (Or any version for that matter). A loading bar appears at the bottom of the browser (As if its trying to load something). But then nothing loads, I don't get the download box asking where I want to save it. Nor do I get a msg saying that "Firefox has prevented a pop-up...". Sometimes you can get around that by right clicking and "Save link as" but that didn't work either. I also turned off my pop-up blocker just in case it was being blocked and not telling me, but no no avail.

 

Sorry for my delayed response over the weekend.

Posted

I dont know if this will help diagnosing or not, but I see that domain.com/catalog/admin comes up just fine, but when I click on "Online Catalog" in the upper left hand corner it does not take me to the correct catalog, is there a file for OSC that is saved outside of the catalog folder? or where would I look to find out how to change the location that link takes me? I checked both configure.php files and neither of them are set for there.

 

P.S. Is there an edit button? because once again I don't see it. I just see "Report", "Reply", "MultiQuote".

Posted

And for a Triple Post, I figured it out. I seems that for some reason I was unable to download it on that computer... Once I tried it on another it downloaded and installed successfully.

 

As for the Results:

I have a new admin username/password

I still cant login.

 

I go to domain.com/catalog/admin/ then type in username/password and it does nothing... Just like I made mention to before I type in the wrong UN/PW it tells me that the info was incorrect, but if I type in the right stuff the admin part of the site doesn't load.

Posted

And for a Triple Post, I figured it out. I seems that for some reason I was unable to download it on that computer... Once I tried it on another it downloaded and installed successfully.

 

As for the Results:

I have a new admin username/password

I still cant login.

 

I go to domain.com/catalog/admin/ then type in username/password and it does nothing... Just like I made mention to before I type in the wrong UN/PW it tells me that the info was incorrect, but if I type in the right stuff the admin part of the site doesn't load.

 

 

Hi i am manit using the same for my 20 websites

 

3 changes you have to make

 

Copy the entire website to the new domain , you wish to clone

 

1) Change the website name from Config.php in includes

2) Then again change the website domain name from config.php from admin/includes

3) Download the sql backup from pho\padmin and in that change the database name , as per your new website / domain

 

It;s done

Posted

Hi i am manit using the same for my 20 websites

 

3 changes you have to make

 

Copy the entire website to the new domain , you wish to clone

 

1) Change the website name from Config.php in includes

2) Then again change the website domain name from config.php from admin/includes

3) Download the sql backup from pho\padmin and in that change the database name , as per your new website / domain

 

It;s done

Posted

Hi i am manit using the same for my 20 websites

 

3 changes you have to make

 

Copy the entire website to the new domain , you wish to clone

 

1) Change the website name from Config.php in includes

2) Then again change the website domain name from config.php from admin/includes

3) Download the sql backup from pho\padmin and in that change the database name , as per your new website / domain

 

It;s done

 

pho/padmin? I have backed up the database through the old website... but I didn't do it as you made mention.

 

As for the rest unfortunately that's what I believe that I did. I can't say that I DID do that, because if I did it would be working. There has to be a file that I am missing or one of the 2 config files I didn't do completely right... something... I'll just have to keep looking, something in there I am doing wrong. If there is more info I can give so that I can get this done... let me know

thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...