Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Copy Oscommerce


carthrina

Recommended Posts

Posted

Hi,

I have oscommerce in my old website with many contributions added. I would like to install it it to my new website.. because I don't want to install a clean one and start adding contributions since it needs much time and effort... Is it possible

to copy it to my new site?

 

If yes, how can I do that?

 

Thank you in advance..

Posted

Hi Cathrina.

 

This should not be too much of a problem.

 

Here is how I suggest you do it.

 

1. Make a copy of all the files on your current site.

 

You should be doing this already so you have a backup copy of your site .

 

Make a folder on your home computer and name it something like live site backup.

With your FTP program open your site and the newly created folder. Transfer all the files and folders from your site into the folder on your home computer.

Once all the files and folders are on your home computer, check through them for anything that doesn't pertain to osCommerce. There will most probably be some folders that are needed by your site for statistics, etc. If unsure, just have a look at a vanilla copy of osCommerce and get rid of the folders that are extras.

 

2. Get a copy of your database file.

 

Again this should be done on a regular basis in case of disaster.

 

In the folder on your home computer, make another folder named say db_backup.

Go into the control panel for your site and head to the databases section (the layout will vary depending on which software your host is using for control).

Open phpmyadmin. Highlight the database in the left column. You should see a list of the tables in the main body and a number of options up the top. Find the one marked "export" and click on that.

You will not have to touch anything on the new page until you get down toward the bottom of that page where you will see a checkbox marked "Save File". Check that box and if you wish you can put detail into the textarea to identify the file (not obligitary). Once done, press go on the bottom right and you will be prompted to save file. Give it the path to your backup folder and it will copy your db file into your home computer.

 

You now have a full copy of your site on your home computer.

 

You can now copy all the files and folders onto the new website.

 

2 ways to do this.

 

Firstly.

If your new host has osCommerce available, load their copy onto your new site. Open the site and make sure that it is up and running with a vanilla copy of osCommerce. This will set up the configure file and database for you. Then all you need to do is to copy all your files and folders onto the new website with the exception of the includes/configure.php and admin/includes/configure files as these files give the paths to various functions and the database, and the files already on the new site are configured.

 

Go into phpmyadmin on your new site and remove all the tables , leaving the database there ( that is, do not remove the database, just the tables in it). The reason I do this is that I have problems in the past with the call to remove if exists is ignored and there may be problems.

Click on the "Import" or "SQL" tab and you will be prompted to find a file. Direct the path to the file sitting in the db_backup folder on you home computer. Install that file and it should all then work.

 

Secondly, you can install from scratch. That means installing all your files and folders from your home computer into your new site, creating a database, loading your database backup file, and altering the configure.php files to reflect the paths on your new site.

 

Hope that gets you started. My fingers hurt now. :blink:

 

Mark

Posted

Hehe Thank you Mark , you are not only helpful but also funny :) I appreciate your help.. I'd like to know to which directory should I upload oscommerce files ? since there are two :

httpdocs and httpsdocs

Knowing that when I setup my website through Plesk reloaded there was an option to check : Support SSL, I checked that case box.. also I checked: Use a single directory for housing SSL and non-SSL content ..

 

Now I have httpdocs and httpsdocs .. I just checked them even if I don't know the meaning of that...

 

Could anyone tell me what to do please ...

Posted

It really depends upon how you are set up with your host. You need to purchase a SSL certificate from your host before you can use https. If you have not done that, then the files will go into httpdocs folder. Also, if you do not have the certificate, checking the support SSl will cause problems when you try to open the site.

 

So, it realy depends on whether you are going to have your site on a secure socket layer or not, hance http (not secure) and https (secure).

Posted

Thank you Mark, I really appreciate your suggestion. I haven't oscommerce in my hosting plan, so I am trying to install it from scratch.. I did all the steps mentioned above, but I have another question here:

 

You said I should alter the configure.php to suit the new hosting server. In my old configure I had :

 

define('DIR_FS_CATALOG', '/home/toys/public_html');

 

because my old oscommerce was installed in public_html directory.. but in my new hosting server I cannot see this public_html folder but instead i see httpdocs folder in which i uploaded all my os files.

Now I would like to know how to change the configure.php, what should I write instead of :

 

define('DIR_FS_CATALOG', '/home/toys/public_html'); as I don't have public_html folder now, how can i know the right path?

 

A quick reply is appreciated :)

 

Best regards ,

Posted

Hi Cathrina.

 

Which host are you with again? I will see if there is anything in their help files for you.

 

Not sure how your host is setting the root directory up, but at the moment I would suggest that httpdocs would replace public_html, and what is with the toys folder that was on the old site?

Posted

Mark my dear, how are you today? i am having troubles :'( My host is hostingpanama.com

I just replaced public_html with httpdocs in this way:

 

define('DIR_FS_CATALOG', '/httpdocs/);

 

when I uploaded the files of Os, to httpdocs folder, the ftp created all the folders but did not transfer the files.. after that the transfer stopped and I tried to access to httpdocs folder to have a look, but I could not and my ftp shows an error message:

 

PWD

257 "/" is current directory.

PWD

257 "/" is current directory.

PWD

 

 

I still have access to this folder throup my Cpanel, but through ftp cannot, what should I do in such case please??

 

Please it's urgent ...

Posted

I'm back.

 

It is going to depend on how they have your root directory set up.

 

Having checked 2 of my sites with different hosts, there are a couple of subtle differences with them.

 

The one in Aus is /home/"my username"/public_html/

 

whilst the one at godaddy is /home/content/"my username"/html/

 

I went onto your hosts website but I could not find anything specific regarding the path to the root directory.

 

In the contact section of your host they have a contact number and an email address. I won't post the email address in case of spambots. I would suggest that you get in contact with them and find out what is the correct path to your root directory. It will change from 1 host to another.

 

Also, while you are there, better check on the correct path to the database, you will also need that in the configure files.

 

I am sorry I cannot help you further with this, but it seems to be an answer that only your host can answer.

 

Once you have these details and if there is anything else you need, please don't hesitate to ask.

 

Peace, love and a vegemite sandwich.

Posted

Thank you for your efforts :) I was reading their tutorials..i come across setting up a webuser.. what is WebUser?

Is that important?

 

 

 

Sandwich ?! lol you seem hungry Mark lol

Posted

Just had a look at it. It seems that you can allow someone else to use part of your server allocation. Web user sets up the account for them.

Posted

Hey Mark I followed your advice, i sent them and email asking them about this matter..

 

Mark you are only one who always help me, it seems that others hate me lol just joking...

 

No one could reply to one of my posts though i posted it several days ago lol

 

Mark you are my hope, I know I will smell something burning again hehe lol :)

 

Here is it:

 

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

 

 

If you cannot help, no problem my dear, don't bother yourself.. :)

Posted

Hey Mark I followed your advice, i sent them and email asking them about this matter..

 

Mark you are the only one who always help me, it seems that others hate me lol just joking...

 

No one could reply to one of my posts though i posted it several days ago lol

 

Mark you are my hope, I know I will smell something burning again hehe lol :)

 

Here is it:

 

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

 

 

If you cannot help, no problem my dear, don't bother yourself.. :)

  • 2 years later...
Posted

Hi Cathrina.

 

This should not be too much of a problem.

 

Here is how I suggest you do it.

 

1. Make a copy of all the files on your current site.

 

You should be doing this already so you have a backup copy of your site .

 

Make a folder on your home computer and name it something like live site backup.

With your FTP program open your site and the newly created folder. Transfer all the files and folders from your site into the folder on your home computer.

Once all the files and folders are on your home computer, check through them for anything that doesn't pertain to osCommerce. There will most probably be some folders that are needed by your site for statistics, etc. If unsure, just have a look at a vanilla copy of osCommerce and get rid of the folders that are extras.

 

2. Get a copy of your database file.

 

Again this should be done on a regular basis in case of disaster.

 

In the folder on your home computer, make another folder named say db_backup.

Go into the control panel for your site and head to the databases section (the layout will vary depending on which software your host is using for control).

Open phpmyadmin. Highlight the database in the left column. You should see a list of the tables in the main body and a number of options up the top. Find the one marked "export" and click on that.

You will not have to touch anything on the new page until you get down toward the bottom of that page where you will see a checkbox marked "Save File". Check that box and if you wish you can put detail into the textarea to identify the file (not obligitary). Once done, press go on the bottom right and you will be prompted to save file. Give it the path to your backup folder and it will copy your db file into your home computer.

 

You now have a full copy of your site on your home computer.

 

You can now copy all the files and folders onto the new website.

 

2 ways to do this.

 

Firstly.

If your new host has osCommerce available, load their copy onto your new site. Open the site and make sure that it is up and running with a vanilla copy of osCommerce. This will set up the configure file and database for you. Then all you need to do is to copy all your files and folders onto the new website with the exception of the includes/configure.php and admin/includes/configure files as these files give the paths to various functions and the database, and the files already on the new site are configured.

 

Go into phpmyadmin on your new site and remove all the tables , leaving the database there ( that is, do not remove the database, just the tables in it). The reason I do this is that I have problems in the past with the call to remove if exists is ignored and there may be problems.

Click on the "Import" or "SQL" tab and you will be prompted to find a file. Direct the path to the file sitting in the db_backup folder on you home computer. Install that file and it should all then work.

 

Secondly, you can install from scratch. That means installing all your files and folders from your home computer into your new site, creating a database, loading your database backup file, and altering the configure.php files to reflect the paths on your new site.

 

Hope that gets you started. My fingers hurt now. :blink:

 

Mark

 

Hi Mark, firstly thanks for the above post as I also wanted to do this and spent quite a while looking through posts for an answer to this and I have to say that I followed your advice to the letter and it all worked a treat apart from one little problem I came across upon completion. I could not log in to my admin panel. Luckily I had backuped up everything from both sites, that is my new site and the site I was duplicating including both mysql databases. What I did was compare the mysql databases and noted around line 100 there is the following code:

 

[/b]
--
-- Dumping data for table `administrators`
--

LOCK TABLES `administrators` WRITE;
/*!40000 ALTER TABLE `administrators` DISABLE KEYS */;
INSERT INTO `administrators` VALUES (1,'admin','123456789:Array');
/*!40000 ALTER TABLE `administrators` ENABLE KEYS */;
UNLOCK TABLES;
[b]

 

In the above code Values 1 admin is the username and 123456789 is the password to enter the admin panel (Note this is not my actual username and password - used as example)

 

What I had to do was find these values in my sql file from the backup of my new site then copy and paste them into the mysql file for the site which I was duplicating. I then had to re-upload the backup of mysql from the old site with the new values and I then had access to my admin panel.

 

Hope this all makes sense, any queries then please just ask.

 

Thanks again for your other effort.

 

Michael

Archived

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

×
×
  • Create New...