Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Incorret page path for secure pages


Guest

Recommended Posts

Had to reinstall OSC yesterday.

 

Now the header row buttons at the top which go to "My Account" "Cart Contents" "Checkout" are going to the incorrect place(s).

 

Only the https:// links have the wrong path. Here is where the links are going:

 

-------------

My account (incorrect) https://darkelfcollection.com/account.php?

 

Should be going to: https://darkelfcollection.com/main/account.php?

-------------

 

-------------

Cart Contents (correct): http://www.darkelfcollection.com/main/shopping_cart.php?

-------------

 

-------------

Checkout (incorrect):

https://darkelfcollection.com/checkout_shipping.php?

 

Should be going to: https://darkelfcollection.com/main/checkout_shipping.php?

-------------

 

/main/ is my catalog directory.

 

Below is my configure.php file. Why are the secure links going to the top level of the domain, and not to /main/?

 

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 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.darkelfcollection.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTP_CATALOG_SERVER', 'http://www.darkelfcollection.com');
 define('HTTPS_CATALOG_SERVER', 'https://darkelfcollection.com');
 define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module
 define('HTTP_COOKIE_DOMAIN', 'www.darkelfcollection.com');
 define('HTTPS_COOKIE_DOMAIN', 'darkelfcollection.com');
 define('HTTP_COOKIE_PATH', '/cgi');
 define('HTTPS_COOKIE_PATH', '/cgi');
 define('DIR_WS_HTTP_CATALOG', '/main/');
 define('DIR_WS_HTTPS_CATALOG', '/main/');
 define('DIR_FS_DOCUMENT_ROOT', '/home/XX/darkelfcollection.com/main/'); // where the pages are located on the server
 define('DIR_WS_ADMIN', '/main/admin/'); // absolute path required
 define('DIR_FS_ADMIN', '/home/XX/darkelfcollection.com/main/admin/'); // absolute pate required
 define('DIR_WS_CATALOG', '/main/'); // absolute path required
 define('DIR_FS_CATALOG', '/home/XX/darkelfcollection.com/main/'); // 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', 'XX'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', 'XX);
 define('DB_SERVER_PASSWORD', 'XX');
 define('DB_DATABASE', 'XX');
 define('USE_PCONNECT', 'true'); // use persisstent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
?>

Link to comment
Share on other sites

this:

define('DIR_FS_DOCUMENT_ROOT', '/home/XX/darkelfcollection.com/main/'); // where the pages are located on the server

 

is probably this:

define('DIR_FS_DOCUMENT_ROOT', '/home/XX/darkelfcollection.com'); // where the pages are located on the server

 

check by going to store admin/tools/server_info and search for document_root

Link to comment
Share on other sites

Mibble (thank you SO much for answering me!) --you are absolutly right.

 

In my admin / tools / server_info, I found this:

 

Document_root:

/home/darkelf1/darkelfcollection.com

 

As you said above, I imagine it needs to be:

/home/darkelf1/darkelfcollection.com/main/

 

How do I change that document_root in the server_info area?

Link to comment
Share on other sites

I figured it out!

 

I am posting this here in the hopes it might help someone who has a similar issue in the future.

 

I had only been changing the variable found in /catalog/admin/includes/configure.php

 

When I peeked at catalog/includes/configure.php, I found this:

 

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

define('DIR_WS_HTTPS_CATALOG', '/');

 

BINGO!

 

I just changed it to this:

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

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

 

and now all of the links are working as they should.

Link to comment
Share on other sites

great, as that is one of the items most do not change, the best bet for document_root is to use $DOCUMENT_ROOT and then it all works.

remember, the search works great here as does the knowledge base.

Link to comment
Share on other sites

Thanks, Mibble! Actually, I usually scour the heck out of the forums before posting a question. In fact, that's how I figured this out. I didn't find another thread exactly the same, but I did find one where people were discussing changes to the catalog/includes/configure.php file, for an unrelated topic. I sat back and said, "well, DUH! I didn't know there were two config files. I bet that's where the problem is." And BINGO! It was. :-)

 

Searching the forums often helps me to fix a problem even with an unrelated topic. LOL.

 

Thanks again for your help. I didn't know I could see my server_info, either. :-)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...