Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Test Site?


irishtxboy

Recommended Posts

Can anyone tell me how to go about setting up a test site. I've installed several contribs to my live site most with no problems some caused problems I had to fix. Would love to avoid this in the future. Thanks

Link to comment
Share on other sites

Can anyone tell me how to go about setting up a test site. I've installed several contribs to my live site most with no problems some caused problems I had to fix. Would love to avoid this in the future. Thanks

 

 

You can set a test site up on your server easy enough. Create another database and populate it with the info from your live site. Create a folder called test then copy all your files to it and then edit the two configure.php files to reflect the new location.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

Can anyone tell me how to go about setting up a test site. I've installed several contribs to my live site most with no problems some caused problems I had to fix. Would love to avoid this in the future. Thanks

For an offline test set-up, try installing XAMPP on your PC - it's an Apache distribution which will allow you to test your osCom shop on your PC before uploading any files.

 

You can get XAMPP here:

http://www.apachefriends.org/en/index.html

 

all the best, Terra

My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Link to comment
Share on other sites

You can set a test site up on your server easy enough. Create another database and populate it with the info from your live site. Create a folder called test then copy all your files to it and then edit the two configure.php files to reflect the new location.

Hi, I'm sort of curious about this one too I'm currently developing my site at http://testcentre.mydomain.com. When it goes live, I'll be moving it to www.mydomain.com. I'm planning on just copying, I'll keep the testcentre subdomain to be my testing grounds. What I'm wondering about is: how do people with live sites go about testing new contributions, etc. I'm worried that, for example

 

WEEK 1:

- product goes out of stock, change the (main) database to reflect this

- i decide to add a new contribution, (test) datbase gets modified in the process

 

what do you do to get the contribution to work in the live store? do you reload the contribution on the live store once you know it works on your test site? or do you make sure the databases are identical before trying the contribution on the test site (this wouldn't work as far as i can see, because you have no control over what customers do and how their actions modify the db).

 

Any advice on what people are currently doing would be very appreciated!

 

Thanks,

~bobsi18~

Link to comment
Share on other sites

I test offline, and and once it all works I upload the files, making sure that I don't upload files which are different on/offline such as configure.php and .htaccess.

 

Any changes to databases are applied separately, i.e. I run the SQL changes on the live database separately when installing the contrib on the live shop. Keeping a databse in sync with an offline version sound like a lot of hassle and not sure if you gain anything, actually might create more problems by ex/importing databases, plus it's not really a great thing to do on a live site.

 

Also worth bearing in mind that for successful on/offline testing your offline server settings should mirror your online server settings. For the very cautious, a online test shop on the same server might be preferable to offline testing.

 

Actually for big changes, I test in 3 stages:

1. on my PC ... making sure it all works

2. on a test site on my server ... testing online on a test shop

3. install on live site at a very quiet time (usually night) and babysit

 

step 2 gets skipped and step 3 might be middle of the day for smaller changes

 

Terra

My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Link to comment
Share on other sites

I test offline, and and once it all works I upload the files, making sure that I don't upload files which are different on/offline such as configure.php and .htaccess.

 

Any changes to databases are applied separately, i.e. I run the SQL changes on the live database separately when installing the contrib on the live shop. Keeping a databse in sync with an offline version sound like a lot of hassle and not sure if you gain anything, actually might create more problems by ex/importing databases, plus it's not really a great thing to do on a live site.

 

Also worth bearing in mind that for successful on/offline testing your offline server settings should mirror your online server settings. For the very cautious, a online test shop on the same server might be preferable to offline testing.

 

Actually for big changes, I test in 3 stages:

1. on my PC ... making sure it all works

2. on a test site on my server ... testing online on a test shop

3. install on live site at a very quiet time (usually night) and babysit

 

step 2 gets skipped and step 3 might be middle of the day for smaller changes

 

Terra

Thanks for your quick response! When I'm ready to go live, I'll know how to handle updating my store...

 

:) ~bobsi18~

Link to comment
Share on other sites

You can set a test site up on your server easy enough. Create another database and populate it with the info from your live site. Create a folder called test then copy all your files to it and then edit the two configure.php files to reflect the new location.

 

 

Thanks for the heads up. I have downloaded and installed Xampp now my question is where do I copy my files from my store to?

Link to comment
Share on other sites

In your xampp directory there will be another directory named htdocs, all your files will be served from there. You can either copy them direct to that directory or, create a folder within htdocs and copy into that. That is the best way to do it as you can have as many stores as you wish. :D

Link to comment
Share on other sites

In your xampp directory there will be another directory named htdocs, all your files will be served from there. You can either copy them direct to that directory or, create a folder within htdocs and copy into that. That is the best way to do it as you can have as many stores as you wish. :D

 

 

Thank you... Do I need to redefine my doc root to c:/xampp/xampp/htdocs/Whatever

Link to comment
Share on other sites

In your xampp directory there will be another directory named htdocs, all your files will be served from there. You can either copy them direct to that directory or, create a folder within htdocs and copy into that. That is the best way to do it as you can have as many stores as you wish. :D

 

 

I put my files in htdocs went to local host and got this error page

 

Warning: require(xampp/xampp/htdocs/application_top.php) [function.require]: failed to open stream: No such file or directory in C:\xampp\xampp\htdocs\index.php on line 13

 

Fatal error: require() [function.require]: Failed opening required 'xampp/xampp/htdocs/application_top.php' (include_path='.;C:\xampp\xampp\php\pear\') in C:\xampp\xampp\htdocs\index.php on line 13

 

Help I'm lost as to how to fix this

Link to comment
Share on other sites

Do you have an xampp folder within another xampp folder?

 

C:\xampp\xampp\htdocs\index.php

 

Your doc root might be something more like

 

C:/Program Files/xampp/htdocs/

 

assuming you're running on windows. :huh:

 

 

I put my files in htdocs went to local host and got this error page

 

Warning: require(xampp/xampp/htdocs/application_top.php) [function.require]: failed to open stream: No such file or directory in C:\xampp\xampp\htdocs\index.php on line 13

 

Fatal error: require() [function.require]: Failed opening required 'xampp/xampp/htdocs/application_top.php' (include_path='.;C:\xampp\xampp\php\pear\') in C:\xampp\xampp\htdocs\index.php on line 13

 

Help I'm lost as to how to fix this

Link to comment
Share on other sites

Do you have an xampp folder within another xampp folder?

 

C:\xampp\xampp\htdocs\index.php

 

Your doc root might be something more like

 

C:/Program Files/xampp/htdocs/

 

assuming you're running on windows. :huh:

 

 

C:\xampp\xampp\

 

Windows xp

Link to comment
Share on other sites

Yeah, amongst all the constants in the 2 configure files, you should have:

 

includes/configure.php

 

  define('HTTP_SERVER', 'http://127.0.0.1'); // 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', '127.0.0.1');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', '/whatever/');
 define('HTTPS_COOKIE_PATH', '');
 define('DIR_WS_HTTP_CATALOG', '/whatever/');
 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:/xampp/xampp/htdocs/whatever/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

admin/includes/configure.php

 

  define('HTTP_SERVER', 'http://127.0.0.1'); // eg, http://localhost - should not be empty for productive servers
 define('HTTP_CATALOG_SERVER', 'http://127.0.0.1');
 define('HTTPS_CATALOG_SERVER', '');
 define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
 define('DIR_FS_DOCUMENT_ROOT', 'C:/xampp/xampp/htdocs/whatever/'); // where the pages are located on the server
 define('DIR_WS_ADMIN', '/catalog/admin/'); // absolute path required
 define('DIR_FS_ADMIN', 'C:/xampp/xampp/htdocs/whatever/admin/'); // absolute pate required
 define('DIR_WS_CATALOG', '/whatever/'); // absolute path required
 define('DIR_FS_CATALOG', 'C:/xampp/xampp/htdocs/whatever/'); // 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/');

 

Watch out for all the 'whatevers'

Link to comment
Share on other sites

Yeah, amongst all the constants in the 2 configure files, you should have:

 

includes/configure.php

 

  define('HTTP_SERVER', 'http://127.0.0.1'); // 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', '127.0.0.1');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', '/whatever/');
 define('HTTPS_COOKIE_PATH', '');
 define('DIR_WS_HTTP_CATALOG', '/whatever/');
 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:/xampp/xampp/htdocs/whatever/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

admin/includes/configure.php

 

  define('HTTP_SERVER', 'http://127.0.0.1'); // eg, http://localhost - should not be empty for productive servers
 define('HTTP_CATALOG_SERVER', 'http://127.0.0.1');
 define('HTTPS_CATALOG_SERVER', '');
 define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
 define('DIR_FS_DOCUMENT_ROOT', 'C:/xampp/xampp/htdocs/whatever/'); // where the pages are located on the server
 define('DIR_WS_ADMIN', '/catalog/admin/'); // absolute path required
 define('DIR_FS_ADMIN', 'C:/xampp/xampp/htdocs/whatever/admin/'); // absolute pate required
 define('DIR_WS_CATALOG', '/whatever/'); // absolute path required
 define('DIR_FS_CATALOG', 'C:/xampp/xampp/htdocs/whatever/'); // 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/');

 

Watch out for all the 'whatevers'

 

 

Thanks Spax that worked, one more quick question what do I have to change so I am the only one who can access my test site

Link to comment
Share on other sites

Thanks Spax that worked, one more quick question what do I have to change so I am the only one who can access my test site

 

 

Now I don't know how to reach my Admin site so I can test the contribs I'm adding

Link to comment
Share on other sites

  • 3 weeks later...
You can set a test site up on your server easy enough. Create another database and populate it with the info from your live site. Create a folder called test then copy all your files to it and then edit the two configure.php files to reflect the new location.

 

Hi,

 

I tried the above

 

 

Copied my live db, upped to another db

copied my live store files to another folder

edited configure.php files to point to the test db

 

 

now all i get is

Warning: mysql_connect(): Access denied for user 'getwi_test'@'localhost' (using password: YES) in /home/getwi/public_html/dev/includes/functions/database.php on line 19
Unable to connect to database server!

Or if I try the admin section

Warning: mysql_connect(): Access denied for user 'getwi_test'@'localhost' (using password: YES) in /home/getwi/public_html/dev/admin/includes/functions/database.php on line 19
Unable to connect to database server!

Any clues as to where I went wrong?

Link to comment
Share on other sites

I have tried changing the username but that didnt work, I have also tried adding the user test but that didnt work either

:(

Link to comment
Share on other sites

Anybody ? please

 

I would really like to be able to ed it stuff on a test site that is a dupe of my live store

 

regards

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...