Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Duplicate a site


starcarlton

Recommended Posts

I am trying to duplicate an oscommerce site that has many mods.

 

Is it possible to use the database dump to add the new mod commands to the install file - so I can do a fresh install of my site and all mods will work?

 

I tried to copy the existing database - and just change the

catalog/includes/configure.php

catalog/admin/includes/configure.php

 

files - but there is something hard coded into the database that isn't allowing new pages to be created.

 

Has anyone duplicated one of their sites with mods? how did you do it?

 

need help please

Thanks

Link to comment
Share on other sites

if you're trying to duplicate your site to other site is what you only need to do is copy your files and then upload to your other site and make necessary configuration values.

Link to comment
Share on other sites

I am trying to duplicate an oscommerce site that has many mods.

 

Is it possible to use the database dump to add the new mod commands to the install file - so I can do a fresh install of my site and all mods will work?

 

I tried to copy the existing database - and just change the

catalog/includes/configure.php

catalog/admin/includes/configure.php

 

files - but there is something hard coded into the database that isn't allowing new pages to be created.

 

Has anyone duplicated one of their sites with mods? how did you do it?

 

need help please

Thanks

 

Try this:

 

  1. Export your old database using phpMyAdmin and save the sql file to your computer
  2. Backup all of your old osCommerce files, all folders and files
  3. Wipe your new location clean of the current osC installation
  4. FTP (upload) your old osCommerce folders and files to the new site
  5. Create a new (blank) database on the new server noting the username and password
  6. Import the old database into the newly created blank database using phpMyAdmin
  7. Edit the admin/includes/configure.php and includes/configure.php to match the paths of your new site. You will also need to edit the database settings in these two files to match your new setup. eg: localhost name, username, password, etc.
  8. Check your file permission settings on the above two files as well as your images and admin/backups folder.

The above is for a manual installation. You may run into problems if your old shop is based on an older version of osCommerce that does not play nicely with an updated server setup that is running PHP 5 and/or MySQL 5. If you old shop is already running the latest version of osC then you should not run into any problems.

 

NOTE: You could follow the migration path that you had previously tried as long as the new osC installation is the same version as your old shop. If not, then you run the risk of files/folders/database not matching up.

 

This is a long way of explaining something that is a pretty straight forward process. I highly suggest that you give the osC Installation thread a read as it goes into more detail of the above:

 

http://www.oscommerce.com/forums/index.php?sho...p;#entry1262567

 

Hope this helped,

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Try this:

 

  1. Export your old database using phpMyAdmin and save the sql file to your computer
  2. Backup all of your old osCommerce files, all folders and files
  3. Wipe your new location clean of the current osC installation
  4. FTP (upload) your old osCommerce folders and files to the new site
  5. Create a new (blank) database on the new server noting the username and password
  6. Import the old database into the newly created blank database using phpMyAdmin
  7. Edit the admin/includes/configure.php and includes/configure.php to match the paths of your new site. You will also need to edit the database settings in these two files to match your new setup. eg: localhost name, username, password, etc.
  8. Check your file permission settings on the above two files as well as your images and admin/backups folder.

The above is for a manual installation. You may run into problems if your old shop is based on an older version of osCommerce that does not play nicely with an updated server setup that is running PHP 5 and/or MySQL 5. If you old shop is already running the latest version of osC then you should not run into any problems.

 

NOTE: You could follow the migration path that you had previously tried as long as the new osC installation is the same version as your old shop. If not, then you run the risk of files/folders/database not matching up.

 

This is a long way of explaining something that is a pretty straight forward process. I highly suggest that you give the osC Installation thread a read as it goes into more detail of the above:

 

http://www.oscommerce.com/forums/index.php?sho...p;#entry1262567

 

Hope this helped,

 

I thought this was relatively easy to do - but my host had said that somethings are hard coded into the database - so it won't work this easy.

 

I did everything mentioned above - When I try to add a new product - nothing comes up.

This is the error I get when I click on the new category:

 

Not Found

 

The requested URL /Pool-Tables/ was not found on this server.

Apache/2.0.51 (Fedora) Server at mysite.com Port 80 ( I changed my url to mysite.com)

 

Any ideas what the problem is?

Link to comment
Share on other sites

I thought this was relatively easy to do - but my host had said that somethings are hard coded into the database - so it won't work this easy.

 

I did everything mentioned above - When I try to add a new product - nothing comes up.

This is the error I get when I click on the new category:

 

Not Found

 

The requested URL /Pool-Tables/ was not found on this server.

Apache/2.0.51 (Fedora) Server at mysite.com Port 80 ( I changed my url to mysite.com)

 

Any ideas what the problem is?

 

If your new site is a new install, and you uploaded all of the backup files from your previous site, and have changed the two configure.php files to point to your new database, then once you upload your previous database everything would match up.

 

Do this: Remove all of the files from the new site (delete). Now, upload your backup files from your old site. Change the two configure.php files to point to the new database. You should be good to go unless you have something in a .htaccess file that in not correct.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

If your new site is a new install, and you uploaded all of the backup files from your previous site, and have changed the two configure.php files to point to your new database, then once you upload your previous database everything would match up.

 

Do this: Remove all of the files from the new site (delete). Now, upload your backup files from your old site. Change the two configure.php files to point to the new database. You should be good to go unless you have something in a .htaccess file that in not correct.

 

I got everything to work to duplicate the site in the root folder on a different url.

Thank you for your help!!!

 

I am now trying to duplicate the site into a folder, in the root folder - that is on another website.

 

I did all of the same steps - but the admin images are not coming up - and it won't let me add new categories or products.

 

If I am copying a database and files that were originally created to be in a root folder - am I going to be able to copy the site into a folder - on a new site?

I am thinking that there might be something hardcoded into the database that tells it to look in the root folder?

 

Can you let me know if I have these config files set up correctly? I looked through the forum for an example - and the one I found didn't help.

In the file below - I am calling the folder "Commerce1"

 

Includes/config

 

<?php

define('HTTP_SERVER', 'http://killersite.com');

define('HTTPS_SERVER', 'http://killersite.com');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', 'killersite.com');

define('HTTPS_COOKIE_DOMAIN', 'killersite.com');

define('HTTP_COOKIE_PATH', '/Commerce1/');

define('HTTPS_COOKIE_PATH', '/Commerce1/');

define('DIR_WS_HTTP_CATALOG', '/Commerce1/');

define('DIR_WS_HTTPS_CATALOG', '/Commerce1/');

define('DIR_WS_IMAGES', '/Commerce1/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/darthvader/killersite.com/html/Commerce1/');

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', 'RT');

define('DB_SERVER_PASSWORD', 'grady');

define('DB_DATABASE', 'RT7080');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

?>

 

Here is the admin config

 

<?php

define('HTTP_SERVER', 'http://killersite.com.com');

define('HTTPS_SERVER', 'http://killersite.com');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', 'killersite.com');

define('HTTPS_COOKIE_DOMAIN', 'killersite.com');

define('HTTP_COOKIE_PATH', '/Commerce1/');

define('HTTPS_COOKIE_PATH', '/Commerce1/');

define('DIR_WS_HTTP_CATALOG', '/Commerce1/');

define('DIR_WS_HTTPS_CATALOG', '/Commerce1/');

define('DIR_WS_IMAGES', '/Commerce1/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/DarthVader/killersite.com/html/Commerce1/');

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', 'RT');

define('DB_SERVER_PASSWORD', 'grady);

define('DB_DATABASE', 'RT7080');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

?>

 

Thanks :unsure:

Link to comment
Share on other sites

Can someone please give me an example of the admin config file - when the store is not in the root folder.

Lets just say it's in the catalog folder.

 

http://www.mysite.com/catalog/

 

I copied my site to a folder on another site - almost everything is working - except the admin images don't show up - and my lightbox is not working.

 

I think I have something wrong with the admin config as it is in a folder in the root.

any help would be appreciated.

 

Thanks

Link to comment
Share on other sites

Can someone please give me an example of the admin config file - when the store is not in the root folder.

Lets just say it's in the catalog folder.

 

http://www.mysite.com/catalog/

 

I copied my site to a folder on another site - almost everything is working - except the admin images don't show up - and my lightbox is not working.

 

I think I have something wrong with the admin config as it is in a folder in the root.

any help would be appreciated.

 

Thanks

 

 

I am having exactly the same problem. hopefully someone will be able to help...

Link to comment
Share on other sites

The best way to make such a change is to install a clean shop to the new server and then copy and overrride with any of the backup files except the configure.php files for admin and catalog. Since you didn't, check the physical and logical path to your shop using phpinfo(). You can run the script server_info.php in your admin section to do this. The paths under HTTP_referrer and SCRIPT_FILENAME shold give you the data for your configure.php. All DIR_WS_* entries are pointing to the logical paths, the DIR_FS_* entries point to the physical paths.

Link to comment
Share on other sites

The best way to make such a change is to install a clean shop to the new server and then copy and overrride with any of the backup files except the configure.php files for admin and catalog. Since you didn't, check the physical and logical path to your shop using phpinfo(). You can run the script server_info.php in your admin section to do this. The paths under HTTP_referrer and SCRIPT_FILENAME shold give you the data for your configure.php. All DIR_WS_* entries are pointing to the logical paths, the DIR_FS_* entries point to the physical paths.

 

I can't install a real clean shop - as I made many mods to the site.

 

I duplicated 2 sites from my main site - well - it seems after looking at the file you mentioned above (server_info.php) - I can see there is a line of code that points to the includes file on the store I copied the site from.

 

Example:

include_path .:/php/includes:/home/JibJab/bestgames.com/html/includes:./includes:/home/JibJab/bestgamess.com/html:./home/JibJab/bestgames.com/html/includes/functions .:/php/includes:/home/JibJab/bestgames.com/html/includes:./includes:/home/JibJab/bestgames.com/html:./home/JibJab/bestgames.com/html/includes/functions

 

Suffice to say - the site include paths listed above - are not for the site I am working on. I think when I uploaded categories and images on my new site- it eventually messed up both sites because the include path above is not on the main site - make sense?

 

My question now is - how can I copy a site so this doesn't happen? Help me obiwan kenobi - .... :(

 

If someone could also list what the config files should look like if the site is in a sub folder (catalog folder) - that would help me sort this all out

Link to comment
Share on other sites

define('HTTP_SERVER', 'http://killersite.com.com');

 

that has too many .coms for starters. Also, you shouldn't give your username and password out like that.

Link to comment
Share on other sites

define('HTTP_SERVER', 'http://killersite.com.com');

 

that has too many .coms for starters. Also, you shouldn't give your username and password out like that.

 

The too many .coms was an accident/typo

 

and as far as giving my password out - I am not that amateur to post any valid paths or passwords on forums.

 

If someone could please post a config file example where oscommerce is in the catalog folder - that would help me a ton.

http://www.killershite.com/catalog/

 

TANKS :lol:

Link to comment
Share on other sites

You overwrote your admin/includes configure with catalog/includes configure file.

 

Your catalog/admin/includes configure.php file would look like this.

Fill out the database section and you should be good to go.

<?php
/*
 $Id: configure.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

// define our webserver variables
// FS = Filesystem (physical)
// WS = Webserver (virtual)
 define('HTTP_SERVER', 'http://killersite.com'); 
 define('HTTP_CATALOG_SERVER', 'http://killersite.com');
 define('HTTPS_CATALOG_SERVER', 'http://killersite.com');
 define('ENABLE_SSL_CATALOG', 'false'); 

 define('DIR_FS_DOCUMENT_ROOT', /home/darthvader/killersite.com/html/); 

 define('DIR_WS_ADMIN', '/catalog/admin/');
 define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);

 define('DIR_WS_CATALOG', '/catalog/');
 define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

 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 our database connection
 define('DB_SERVER', '');
 define('DB_SERVER_USERNAME', 'mysql');
 define('DB_SERVER_PASSWORD', '');
 define('DB_DATABASE', 'osCommerce');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', '');

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...