Guest Posted December 4, 2004 Posted December 4, 2004 Hi All, I was wondering if I could get some urgent advice for setting up my oscommerce store in my root directory. Everything was fine when my store was installed in the /catalog directory. I had a redirect set up by my hosting company so that when people entered my site www.akira-ma.com.au, they would be redirected to www.akira-ma.com.au/catalog/. When someone logged in they would be transferred to my secure server https...etc. But as part of search engine optimisation, my consultants have asked me to set up my website so that there are no redirects when someone enters my site. So my hosting company moved my oscommerce files from the /catalog/ directory to the root diectory (www). Now it loads up ok but everything gets all messed up when someone logs into their account (i have tested this with a testing account i created). When i am logged in and click on links, the site doesn't work properly and keeps going to the log in screen even though i am logged in. When someone logs in they get transferred to my secure server which I think messes everything up with the links. However as I mentioned before, everything was perfect before when the store was in the /catalog directory :( My hosting company altered my configuration.php file when setting this up in the root directory. Everything is all messed up!!! I also have another domain www.akira-ma.com which I would like to work in the same way. Please help anybody!!!! :'(
♥Vger Posted December 4, 2004 Posted December 4, 2004 My hosting company altered my configuration.php file when setting this up in the root directory. If you are going to be running a shopping cart website, you are going to have to learn how to do some things for yourself. If something goes wrong and you can't get a quick response from your hosting company's support staff then you're in deep trouble. What you need to do is to download your configure.php files (via FTP) and take a look at them, because it sounds as if there is an error in them. Vger
Guest Posted December 4, 2004 Posted December 4, 2004 If you are going to be running a shopping cart website, you are going to have to learn how to do some things for yourself. If something goes wrong and you can't get a quick response from your hosting company's support staff then you're in deep trouble. What you need to do is to download your configure.php files (via FTP) and take a look at them, because it sounds as if there is an error in them. Vger <{POST_SNAPBACK}> Here is some more info regarding my problem: I have been testing this and there are severe problems. akira-ma.com.au is unworkable. Once we are logged into the secure server, the links do not work anymore. By looking at the URL, it just keeps on appending the link URL's to it so it becomes 1 massive unuseable/invalid URL and i goes no where but refeshes the page. The cart link ot show my cart contents doesnt work and just reloads the page. Also when the user logs off, it remains on the secure server and the user cannot go anywhere via links it just keeps on loading the sign-in page. Also the www.akira-ma.com is also not working correctly. sometimes it just keeps on asking me to sign in again when I click on links on the menu. When they log off they are still on the secure server. There is a great deal of inconsistency here and the store seems unworkable. Please can you let me know how to resolve this problem? Should I just roll back to how it was before and create a homepage? I didn't want one initially but if that is the only way it can work successfully then I have no choice.
Jack_mcs Posted December 4, 2004 Posted December 4, 2004 It will work as it is and it would be a mistake to go back to the sub-directory. As Vger mentioned, the problem is in your configure files. However, I just looked at the site and did not find anything wrong. What problems are you having? Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Guest Posted December 4, 2004 Posted December 4, 2004 It will work as it is and it would be a mistake to go back to the sub-directory. As Vger mentioned, the problem is in your configure files. However, I just looked at the site and did not find anything wrong. What problems are you having? Jack <{POST_SNAPBACK}> Hi jack, Thanks for looking at my site. If you create an account and log in and try browsing around the categories (via the links) etc you will see where the problem lies. When you log in the url changes to the secure server (eg https://www.etc etc) then when u click on the links they don't work! It just takes you back to the log in screen (even though u are already logged in). If you click on 'cart contents', it doesn't work either. Then when you log off, it remains on the secure server and the links dont work once again.
♥Vger Posted December 4, 2004 Posted December 4, 2004 If you want help on this you will have to download both of your configure.php files and post them here, without the database user name and password for security. The files are found in admin/includes/ includes/ If you don't know how to download them via FTP you can download them using the osCommerce File Manager. Vger
boxtel Posted December 5, 2004 Posted December 5, 2004 Hi jack,Thanks for looking at my site. If you create an account and log in and try browsing around the categories (via the links) etc you will see where the problem lies. When you log in the url changes to the secure server (eg https://www.etc etc) then when u click on the links they don't work! It just takes you back to the log in screen (even though u are already logged in). If you click on 'cart contents', it doesn't work either. Then when you log off, it remains on the secure server and the links dont work once again. <{POST_SNAPBACK}> reduce you images, you are pumping 4 MB down the line on the home page alone. Treasurer MFC
Guest Posted December 5, 2004 Posted December 5, 2004 If you want help on this you will have to download both of your configure.php files and post them here, without the database user name and password for security. The files are found in admin/includes/ includes/ If you don't know how to download them via FTP you can download them using the osCommerce File Manager. Vger <{POST_SNAPBACK}> Here is my configure.php ------------------------------------------------------- <?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.akira-ma.com'); // eg, http://localhost - should not be empty for productive servers if ($_SERVER["HTTP_HOST"] == 'secure1.ilisys.com.au'){ if ($_SERVER["HTTP_REFERER"] == 'secure1.ilisys.com.au'){ define('HTTP_SERVER', 'http://www.akira-ma.com'); // eg, http://localhost - should not be empty for productive servers }else{ define('HTTP_SERVER', $_SERVER["HTTP_REFERER"]); } } define('HTTP_SERVER', 'http://'.$_SERVER["HTTP_HOST"]); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', 'https://secure1.ilisys.com.au/akira'); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', true); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'www.akira-ma.com'); define('HTTPS_COOKIE_DOMAIN', '/'); 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', '/home/a/akira/www/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); // define our database connection define('DB_SERVER', 'mysql.ilisys.com.au'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'removed'); define('DB_SERVER_PASSWORD', 'removed'); define('DB_DATABASE', 'akira_db'); define('USE_PCONNECT', 'true'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' ?> ------------------------------------------------------- Here is my configuration.php <?php /* $Id: configuration.php,v 1.43 2003/06/29 22:50:51 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); if (tep_not_null($action)) { switch ($action) { case 'save': $configuration_value = tep_db_prepare_input($HTTP_POST_VARS['configuration_value']); $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']); tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($configuration_value) . "', last_modified = now() where configuration_id = '" . (int)$cID . "'"); // set the WARN_BEFORE_DOWN_FOR_MAINTENANCE to false if DOWN_FOR_MAINTENANCE = true if ( (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') && (DOWN_FOR_MAINTENANCE == 'true') ) { tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = 'false', last_modified = '" . NOW . "' where configuration_key = 'WARN_BEFORE_DOWN_FOR_MAINTENANCE'"); } tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cID)); break; } } $gID = (isset($HTTP_GET_VARS['gID'])) ? $HTTP_GET_VARS['gID'] : 1; $cfg_group_query = tep_db_query("select configuration_group_title from " . TABLE_CONFIGURATION_GROUP . " where configuration_group_id = '" . (int)$gID . "'"); $cfg_group = tep_db_fetch_array($cfg_group_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo $cfg_group['configuration_group_title']; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CONFIGURATION_TITLE; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CONFIGURATION_VALUE; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $configuration_query = tep_db_query("select configuration_id, configuration_title, configuration_value, use_function from " . TABLE_CONFIGURATION . " where configuration_group_id = '" . (int)$gID . "' order by sort_order"); while ($configuration = tep_db_fetch_array($configuration_query)) { if (tep_not_null($configuration['use_function'])) { $use_function = $configuration['use_function']; if (ereg('->', $use_function)) { $class_method = explode('->', $use_function); if (!is_object(${$class_method[0]})) { include(DIR_WS_CLASSES . $class_method[0] . '.php'); ${$class_method[0]} = new $class_method[0](); } $cfgValue = tep_call_function($class_method[1], $configuration['configuration_value'], ${$class_method[0]}); } else { $cfgValue = tep_call_function($use_function, $configuration['configuration_value']); } } else { $cfgValue = $configuration['configuration_value']; } if ((!isset($HTTP_GET_VARS['cID']) || (isset($HTTP_GET_VARS['cID']) && ($HTTP_GET_VARS['cID'] == $configuration['configuration_id']))) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) { $cfg_extra_query = tep_db_query("select configuration_key, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_id = '" . (int)$configuration['configuration_id'] . "'"); $cfg_extra = tep_db_fetch_array($cfg_extra_query); $cInfo_array = array_merge($configuration, $cfg_extra); $cInfo = new objectInfo($cInfo_array); } if ( (isset($cInfo) && is_object($cInfo)) && ($configuration['configuration_id'] == $cInfo->configuration_id) ) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $configuration['configuration_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo $configuration['configuration_title']; ?></td> <td class="dataTableContent"><?php echo htmlspecialchars($cfgValue); ?></td> <td class="dataTableContent" align="right"><?php if ( (isset($cInfo) && is_object($cInfo)) && ($configuration['configuration_id'] == $cInfo->configuration_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $configuration['configuration_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php } ?> </table></td> <?php $heading = array(); $contents = array(); switch ($action) { case 'edit': $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>'); if ($cInfo->set_function) { eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value) . '");'); } else { $value_field = tep_draw_input_field('configuration_value', $cInfo->configuration_value); } $contents = array('form' => tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=save')); $contents[] = array('text' => TEXT_INFO_EDIT_INTRO); $contents[] = array('text' => '<br><b>' . $cInfo->configuration_title . '</b><br>' . $cInfo->configuration_description . '<br>' . $value_field); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($cInfo) && is_object($cInfo)) { $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a>'); $contents[] = array('text' => '<br>' . $cInfo->configuration_description); $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . tep_date_short($cInfo->date_added)); if (tep_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . tep_date_short($cInfo->last_modified)); } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
♥Vger Posted December 5, 2004 Posted December 5, 2004 From includes/configure.php, get rid of all this code - don't know where that came from if ($_SERVER["HTTP_HOST"] == 'secure1.ilisys.com.au'){if ($_SERVER["HTTP_REFERER"] == 'secure1.ilisys.com.au'){ define('HTTP_SERVER', 'http://www.akira-ma.com'); // eg, http://localhost - should not be empty for productive servers }else{ define('HTTP_SERVER', $_SERVER["HTTP_REFERER"]); } } define('HTTP_SERVER', 'http://'.$_SERVER["HTTP_HOST"]); // eg, http://localhost - should not be empty for productive servers The second file you posted is not your admin/includes/configure.php file. Vger
Guest Posted December 5, 2004 Posted December 5, 2004 From includes/configure.php, get rid of all this code - don't know where that came fromThe second file you posted is not your admin/includes/configure.php file. Vger <{POST_SNAPBACK}> Hi again. Heres is the proper admin/includes/configure.php file ---------------------------- <?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.akira-ma.com'); // eg, http://localhost - should not be empty for productive servers define('HTTP_CATALOG_SERVER', 'http://www.akira-ma.com'); define('HTTPS_CATALOG_SERVER', 'https://secure1.ilisys.com.au/akira'); define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', '/home/a/akira/www/'); // where the pages are located on the server define('DIR_WS_ADMIN', '/admin/'); // absolute path required define('DIR_FS_ADMIN', '/home/a/akira/www/admin/'); // absolute pate required define('DIR_WS_CATALOG', ''); // absolute path required define('DIR_FS_CATALOG', '/home/a/akira/www/'); // 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', 'mysql.ilisys.com.au'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'deleted'); define('DB_SERVER_PASSWORD', 'deleted'); define('DB_DATABASE', 'deleted'); define('USE_PCONNECT', 'true'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' ?> thanks a lot
Guest Posted December 5, 2004 Posted December 5, 2004 From includes/configure.php, get rid of all this code - don't know where that came fromThe second file you posted is not your admin/includes/configure.php file. Vger <{POST_SNAPBACK}> well thank you very much!! i changed the config files like you said and it works fine for akira-ma.com. however, i am having trouble with the akira-ma.com.au. the config files are set up for akira-ma.com. how can we do the same for akira-ma.com.au??? I tried replacing akira-ma.com with akira-ma.com.au in both config files and akira-ma.com.au works but when we add items to the cart, the items currently in the cart start disappearing from the customers cart and reapearing randomly. would this have anything to do with my mirror set up of my 2 domains? once again, my hosting company set up the mirror for me. whats most important is for me to get the akira-ma.com.au working, but i would most prefer if both were working correctly. does anyone else have 2 domains working? thanks again :)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.