Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to change configure.php for a testsite in a sub directory?


bbyyaa

Recommended Posts

I am testing our site in a sub directory before go live. The whole thing is in the subdirectory "testsite". How do I change the configure.php to reflect that? I used # to sub for the actual number here.

 

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

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

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

define('HTTP_COOKIE_DOMAIN', '##.##.###.###');

define('HTTPS_COOKIE_DOMAIN', 'https://##.###.###.###');

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', '/var/www/vhosts/oursite.com/httpdocs/');

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

define('DB_SERVER_PASSWORD', 'xxxxxxxx');

define('DB_DATABASE', 'xxxx');

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

define('STORE_SESSIONS', 'mysql');

Link to comment
Share on other sites

I noticed there are configure.php at the /includes/ and /admin/incldues/ also. How do I change those two?

Thanks for any help in advance.

 

I am testing our site in a sub directory before go live. The whole thing is in the subdirectory "testsite". How do I change the configure.php to reflect that? I used # to sub for the actual number here.

 

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

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

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

define('HTTP_COOKIE_DOMAIN', '##.##.###.###');

define('HTTPS_COOKIE_DOMAIN', 'https://##.###.###.###');

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', '/var/www/vhosts/oursite.com/httpdocs/');

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

define('DB_SERVER_PASSWORD', 'xxxxxxxx');

define('DB_DATABASE', 'xxxx');

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

define('STORE_SESSIONS', 'mysql');

Link to comment
Share on other sites

You'd need to change both config.php files. If I'm not mistaken (which I could well be), you'd simply use http://www.yoursite.com/test on the first two lines (https on line two if your SSL is already installed). If that doesn't do it, I'd try adding test/ to the other lines. The line that defines your absolute path (DIR_FS_CATALOG) would also need to include the /test/ folder. The DB settings won't be affected. If I'm way off on this, I'm sure one of the more experienced members will jump in and get you hooked up. Otherwise, try my suggestions in order from the beginning, if at first you don't succeed, try the next, and so forth. Make a backup before changing anything, then if we totally screw something up, you're covered.

 

Namasté,

Russ

One: people are not wearing enough hats. Two: matter is energy. In the universe, there are many energy fields which we cannot normally perceive. Some energies have a spiritual source which act upon a person's soul. However, this soul does not exist ab initio, as orthodox Christianity teaches. It has to be brought into existence by a process of guided self-observation. However, this is rarely achieved, owing to man's unique ability to be distracted from spiritual matters by everyday trivia.

Link to comment
Share on other sites

Thanks! I found out all I have to do is put /testsite after all the code involved the path.

server, cookie_domain, and FS_CATALOG for main configure.php and /includes/configure.php and /admin/includes/congifure.php

 

You'd need to change both config.php files. If I'm not mistaken (which I could well be), you'd simply use http://www.yoursite.com/test on the first two lines (https on line two if your SSL is already installed). If that doesn't do it, I'd try adding test/ to the other lines. The line that defines your absolute path (DIR_FS_CATALOG) would also need to include the /test/ folder. The DB settings won't be affected. If I'm way off on this, I'm sure one of the more experienced members will jump in and get you hooked up. Otherwise, try my suggestions in order from the beginning, if at first you don't succeed, try the next, and so forth. Make a backup before changing anything, then if we totally screw something up, you're covered.

 

Namasté,

Russ

Link to comment
Share on other sites

  • 1 year later...

None of these options seemed to work for me =\

 

Here is my live shop

http://vesproinc.com/shop/

 

Here is my test-shop

http://vesproinc.com/shop-test/

 

My problem is when i go to the test-shop, the index page loads fine, but when i try to navigate to other pages, i'm always redirected to the main shop (this happens when i try to run locally on my computer as well)

 

I've tried about every obvious configuration I can think of.

 

FYI, i did export the live shop db and then import it into the test shop db...

 

//// Would i need to change something in the db?

 

 

Here are the 2 live shop config files (lives in folder named shop, not in root)...

 

//// Could someone please tell me what changes i would need to make in the 2 config files and anywhere else to get my shop running in a folder named shop-test?

 

BTW, i have not made any changes to htaccess files, but so you know, i know nothing about htaccess files on top of that. =\

 

Thank you so much in advance!!

 

best

chantz

 

=======================================

LIVE SHOP - includes/config.php

=======================================

 

<?php

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

define('HTTPS_SERVER', 'https://www.vesproinc.com');

define('ENABLE_SSL', true);

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

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

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

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

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

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

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', '/hermes/web07/b2578/moo.vespro/shop/');

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

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

 

define('DB_SERVER', '##########');

define('DB_SERVER_USERNAME', '##########');

define('DB_SERVER_PASSWORD', '##########');

define('DB_DATABASE', '##########');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

?>

 

=======================================

LIVE SHOP - admin/includes/config.php

=======================================

 

<?php

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

define('HTTP_CATALOG_SERVER', 'http://vesproinc.com');

define('HTTPS_CATALOG_SERVER', 'http://vesproinc.com');

define('ENABLE_SSL_CATALOG', 'false');

define('DIR_FS_DOCUMENT_ROOT', '/hermes/web07/b2578/moo.vespro/shop/');

define('DIR_WS_ADMIN', '/shop/admin/');

define('DIR_FS_ADMIN', '/hermes/web07/b2578/moo.vespro/shop/admin/');

define('DIR_WS_CATALOG', '/shop/');

define('DIR_FS_CATALOG', '/hermes/web07/b2578/moo.vespro/shop/');

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

define('DB_SERVER_USERNAME', '##########');

define('DB_SERVER_PASSWORD', '##########');

define('DB_DATABASE', '##########');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

?>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...