Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I make a development store from my existing store


agele3

Recommended Posts

Hi,

 

I am hoping someone can help me with this. I have an existing store on a Linux server. I want to download my store to my windows based PC to edit and make upgrades to my store and then upload the edited version to my online store. I understand that I have to load PHP. MySQL and Apache? on my PC. Can I just download a backup version to my PC and then upload again as a backup? Do I have to make any changes for changing from a Linux server to windows and then make the reverse changes for the upload?

 

Please help.

 

I search the forums but could not find specifics for this situation.

 

Thanks

 

Roberta

Link to comment
Share on other sites

Hi,

 

I am hoping someone can help me with this. I have an existing store on a Linux server. I want to download my store to my windows based PC to edit and make upgrades to my store and then upload the edited version to my online store. I understand that I have to load PHP. MySQL and Apache? on my PC. Can I just download a backup version to my PC and then upload again as a backup? Do I have to make any changes for changing from a Linux server to windows and then make the reverse changes for the upload?

 

Please help.

 

I search the forums but could not find specifics for this situation.

 

Thanks

 

Roberta

 

Go to apache friendsHERE and download xampp it installs apache mysql php and phpmyadmin very easy to use and it free.

Link to comment
Share on other sites

lrjbart is correct, XAMPP is great!

 

To answer your other question, there might be minor tweaks that you'll have to make to a couple of files to run on your computer...but your catalog pages will run just the same on your Windows machine and on the host's Linux server.

 

You'll of course have to maintain alternate configure.php files (inclues/configure.php and admin/includes/configure.php) so that you'll have the correct localhost paths specified for your test site.

 

There was a little change I had to make to application_top.php in order to run on my home computer...I had an odd error and found the fix real quick.

 

No other big differences I can think of. :huh:

Link to comment
Share on other sites

Thank for the help.

 

I downloaded the XAMPP but I don't understand how to change to PHP4 based on the instructions given in the download.

 

Also, Do I use FTP to download the site- will this allow me to download a copy?

 

How do I then upload to a non public folder and then transfer to the public one?

 

Thanks

 

Roberta

Link to comment
Share on other sites

In your xampp directory, you will see a file named php-switch.bat

 

Make sure Apache is stopped and double click on php-switch.bat

 

That will bring up a command line prompt. Type in the number 4 and hit return, it will now switch to PHP4, just re-start Apache and you're done.

 

To change back to PHP5, do all the above again but enter 5 instead.

Link to comment
Share on other sites

Boy, That was easy!

 

Now does anyone know how I downloan a copy of my existing store? Can I just do a back up to the hard drive of my PC? or should I use ftp.

 

Thanks

 

Roberta

Link to comment
Share on other sites

To download your store you need to use FTP. If you haven't already got an FTP client you can use FileZilla, which is shipped with XAMPP. Find it from the XAMPP control panel. I've never used it personally so no idea what it is like.

Link to comment
Share on other sites

Look for the htdocs directory that is within the xampp directory. That is where all your php files will be served from so that is where you put them.

 

Now you need to alter the 2 configure.php files so osC knows where everything is. You will find one in catalog/includes and the other in catalog/admin/includes. Best thing to do if you don't know what to change, is post them here (minus your sensitive information) and someone will put you right.

 

Once you have done that, open up a browser, type in (without the asterisk) *http://127.0.0.1/catalog and your store will appear.

Link to comment
Share on other sites

Here is admin/includes/configure.php

 

/ Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://localhost'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.mysite');

define('HTTPS_CATALOG_SERVER', 'https://www.mysite');

define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', '/BASE/NAME/public_html/'); // where the pages are located on the server

define('DIR_WS_ADMIN', '/admin/'); // absolute path required

define('DIR_FS_ADMIN', '/BASE/NAME/public_html/admin/'); // absolute pate required

define('DIR_WS_CATALOG', '/'); // absolute path required

define('DIR_FS_CATALOG', '/BASE/NAME/public_html/'); // absolute path required

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', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'USERMSNE');

define('DB_SERVER_PASSWORD', 'PASSWORD');

define('DB_DATABASE', 'shop');

define('USE_PCONNECT', 'false'); // use persisstent connections?

define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'

?>

 

 

includes configure:

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.mystore'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://www.mystore'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.my store');

define('HTTPS_COOKIE_DOMAIN', 'www.mystore');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

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', '/store/name/public_html/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'NAME');

define('DB_SERVER_PASSWORD', 'PASSWORD');

define('DB_DATABASE', STORE');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'

?>

 

Please let me know what I should change: Note I did change the one to ;local host. Should I change to Localhost for the secure server also.

 

Where do I find Post Cast Server for testing the email functions?

 

Thanks

 

Roberta

Link to comment
Share on other sites

For a local install these are the settings (as edited) for an install in a folder called 'catalog' inside the htdocs folder.

Here is admin/includes/configure.php

 

/ Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://localhost'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://localhost');

define('HTTPS_CATALOG_SERVER', '');

define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', 'c:/apchefriends/xampp/htdocs/catalog/'); define('DIR_WS_ADMIN', '/catalog/admin/'); // absolute path required

define('DIR_FS_ADMIN', 'c:/apachefriends/xampp/htdocs/catalog/admin/'); // absolute pate required

define('DIR_WS_CATALOG', '/'); // absolute path required

define('DIR_FS_CATALOG', 'c:/apachefriends/xampp/htdocs/catalog/'); // absolute path required

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', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'USERMSNE'); //usually called 'root'

define('DB_SERVER_PASSWORD', 'PASSWORD'); / whatever you chose when you installed Xampp

define('DB_DATABASE', 'shop');

define('USE_PCONNECT', 'false'); // use persisstent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

includes configure:

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://localhost'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'localhost');

define('HTTPS_COOKIE_DOMAIN', 'localhost');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '');

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

define('DIR_WS_HTTPS_CATALOG', '');

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', 'c:/apachefriends/xampp/htdocs/catalog/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'NAME'); usually 'root'

define('DB_SERVER_PASSWORD', 'PASSWORD'); whatever you set when you installed xampp

define('DB_DATABASE', STORE');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

 

Please let me know what I should change: Note I did change the one to ;local host. Should I change to Localhost for the secure server also.

 

Where do I find Post Cast Server for testing the email functions?

 

Thanks

 

Roberta

 

For Post Cast just do a Google Search and you'll find it easily enough.

 

The DIR_FS paths above assume that you installed into c:/apachefriends/xampp/htdocs/

 

Vger

Link to comment
Share on other sites

You'll find a php.ini file in xampp\apache\bin\ plus one in xampp\php\ and xampp\php\php4\

 

In all of them, you will see:

 

register_globals = Off

 

Theoretically, if you change the one in xampp\apache\bin\ to:

 

register_globals = On

 

that will cure the error. However, I have changed them all, plus added some local ones and that has never worked for me. I use the register globals patch and that always works (find it under Vger's post).

 

When you say you get an index of catalog but then the error when you click into the next directory, do you mean your store is in a folder within catalog? If that is so, cut and paste it into htdocs. Or you will have to enter *http://localhost/catalog/folder_name/ into the browser.

Link to comment
Share on other sites

Vyer's post is for a new install. I am working on an existing store. So what do I do in this case?

 

At what point in the root directory of the original store should the store have been installed? I installed the backup so there are a lot of levels between catalog and the files store in /public_html i.e.

c:/apachefriends/xampp/htdocs/catalog/backup/homedir/public_html. I just want to be sure it is in the right place.

 

when I downloaded thebackup of the store, I extracted the file that contained 'backup' and this was called catalog and I placed in the catalog file in C:/apachefriends/xampp/htdocs/catalog. Is this correct?

 

How much of this path do I use for the webserver and path parameters where 'absolute path required'?

 

Shouldn't I enable SSL to true if I am testing using the secured server for the secured pages?

 

I hope this makes sense.

 

Roberta

Link to comment
Share on other sites

I get this error:

 

FATAL ERROR: register_globals is disabled in php.ini, please enable it!

How do I fix this?

 

ROberta

 

I'm stuck at the same error. My install was to the default xampp/htdocs/catalog folder. :'(

I'm not sure where to go from here. I was also wondering if I could install multiple dev. sites on the same PC. Hopefully we'll find the solution for this.

Link to comment
Share on other sites

I too have made the change to the php.int files where I found them.

 

To use Vygers patch, should I just compare my files with his and change whereever it is different- I fear this will change something on my existing store- any suggestions from here folks- please?

 

Roberta

Link to comment
Share on other sites

MagickWomyn

 

If yours is a new install, just follow through the 'Patch' catalog directory, copying and pasting the files into the corresponding directory in your catalog directory as you go.

And yes, you can install as many stores onto your local machine as you wish. That's what makes it such fun! :D

 

A tip: Copy the orginal OsCommerce catalog, the one that has the install directory in it and Paste it next to the original. Make the Globals Patch changes to the copy and name it 'patched catalog' so everytime you want a new store, copy the patched one and paste it into htdocs. Then rename for your new store and run install.

 

 

 

agele3

 

Being as your store has changes made, you will need to follow along with the manual install. Just copy every file before changing so if you mess up, you can reinstate the copy. Better still, copy the entire store so you always have a copy of every file.

 

BTW - Vger is a she! ;)

Link to comment
Share on other sites

MagickWomyn

 

If yours is a new install, just follow through the 'Patch' catalog directory, copying and pasting the files into the corresponding directory in your catalog directory as you go.

And yes, you can install as many stores onto your local machine as you wish. That's what makes it such fun! :D

 

A tip: Copy the orginal OsCommerce catalog, the one that has the install directory in it and Paste it next to the original. Make the Globals Patch changes to the copy and name it 'patched catalog' so everytime you want a new store, copy the patched one and paste it into htdocs. Then rename for your new store and run install.

agele3

 

Being as your store has changes made, you will need to follow along with the manual install. Just copy every file before changing so if you mess up, you can reinstate the copy. Better still, copy the entire store so you always have a copy of every file.

 

BTW - Vger is a she! ;)

Unfortunately, my store has also had changes made. I have tried to manually change the the global settings to on in Xampp too, and still get the error message. A manual install was mentioned but I don't know where to find that unless it's under the register globals 1.4a. Would I be better off doing a clean install of OSC and applying the patch and a clean install of Xampp? Still trying to figure out how to get the changed features of the store into that if I do it that way. Confusion reigns supreme here. :angry:

Link to comment
Share on other sites

First of all, the patch I use is for MS2.2. You have to check the one you have is compatible with your version

 

If your changes are cosmetic, you can still follow on replacing your files with the patched ones. There aren't any changes to the root level files. However, if you have added contributions, that have changed some or all of the files included in the patch, then you'll need to use a file compare tool to see what the changes are. There isn't a manual change instruction, at least not in the contribution I have. I didn't actually realise that until I checked for the sake of this. It would be a good thing to have though.

 

You won't need to reinstall xampp, that won't alter anything.

Link to comment
Share on other sites

You'll find a php.ini file in xampp\apache\bin\ plus one in xampp\php\ and xampp\php\php4\

 

In all of them, you will see:

 

register_globals = Off

 

Theoretically, if you change the one in xampp\apache\bin\ to:

 

register_globals = On

 

that will cure the error. However, I have changed them all, plus added some local ones and that has never worked for me.

 

Ok, I take that back!

 

Just out of curiosity I tried the one in xampp\apache\bin\ again and it.....um.....worked. :blush:

 

It takes a big man to admit he is wrong, but I'm sure I read somewhere php.ini only works on the second attempt. :-"

 

Now write it out 100 times - I must restart Apache after changes. >_<

Link to comment
Share on other sites

I'm trying to install on my local PC, default catalog folder. I'm using Xampp, with Php4. I installed the globals register patch files. I checked the Xampp Php ini for long arrays = on. That's ok. When I attempt to install I get the error:

 

Fatal error: Call to undefined function: osc_in_array() in C:\Program Files\xampp\htdocs\catalog\install\install.php on line 20

 

Can't get any further than the 1st step of install because of this. Can anyone help? :'(

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...