nycreal Posted January 4, 2006 Share Posted January 4, 2006 Hi, I'm putting together osc for the first time and have no idea how to use SSL. A coworker of mine started the project and apparently set up the SSL already, but I recently messed up the MySQL database and had to start from a fresh install of osc. Now, when I go to My Account or Checkout, an alert box pops up for my SSL Certificate, but after that it says No Page Found. Which would make sense because the URL is https:// now instead of http:// How do I proceed from here? Link to comment Share on other sites More sharing options...
Guest Posted January 4, 2006 Share Posted January 4, 2006 Hi, I'm putting together osc for the first time and have no idea how to use SSL. A coworker of mine started the project and apparently set up the SSL already, but I recently messed up the MySQL database and had to start from a fresh install of osc. Now, when I go to My Account or Checkout, an alert box pops up for my SSL Certificate, but after that it says No Page Found. Which would make sense because the URL is https:// now instead of http:// How do I proceed from here? Do you have an ssl cert installed properly? Sounds like a server error. Oscommece cannot locate your secure pages. Link to comment Share on other sites More sharing options...
nycreal Posted January 4, 2006 Author Share Posted January 4, 2006 Do you have an ssl cert installed properly? Sounds like a server error. Oscommece cannot locate your secure pages. Thank you for your response! Well before I performed the fresh reinstall of osc it was working fine. It was set up by someone else. That person can't be reached right now, and I would have wanted to be able to fix it myself. Either way, it's something for me to learn. As for osc not being able to locate my secure pages, I didn't define any. How do I do that? And which pages? Thanks for your time! Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 4, 2006 Share Posted January 4, 2006 There are two steps to installing an ssl cert into a shop: install it on the server and setup the shops configure file. My guess is that your friend did the first but not the second. If you are not sure how to check that, post your includes/configure.php file here, without the database information at the bottom of it. 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 Link to comment Share on other sites More sharing options...
nycreal Posted January 4, 2006 Author Share Posted January 4, 2006 There are two steps to installing an ssl cert into a shop: install it on the server and setup the shops configure file. My guess is that your friend did the first but not the second. If you are not sure how to check that, post your includes/configure.php file here, without the database information at the bottom of it. Jack Oh ok, thanks =) Yeah I think this would be my problem, because with a new osc install, I never added anything to this file, except for STS. Thanks for your time. <?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.cinacorp.com'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', 'https://www.cinacorp.com'); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', true); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'www.cinacorp.com'); define('HTTPS_COOKIE_DOMAIN', 'www.cinacorp.com'); define('HTTP_COOKIE_PATH', '/items'); define('HTTPS_COOKIE_PATH', '/items'); define('DIR_WS_HTTP_CATALOG', '/items/'); define('DIR_WS_HTTPS_CATALOG', '/items/'); 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/virtual/site449/fst/var/www/html/items/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); Link to comment Share on other sites More sharing options...
nycreal Posted January 4, 2006 Author Share Posted January 4, 2006 Oh and if you don't mind, would you happen to know how to add a description to the Category links listed in the Category box (catalog/includes/boxes/categories.php)? I installed Category Description, but that adds it to the category listing under catalog/index.php. I have no knowledge of PHP, but I tried imitating the code I found in index.php in catalog/includes/boxes/categories.php as follows: $category_query = tep_db_query("select cd.categories_name, cd.categories_heading_title, cd.categories_description, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . $current_category_id . "' and cd.categories_id = '" . $current_category_id . "' and cd.language_id = '" . $languages_id . "'"); $category = tep_db_fetch_array($category_query); $desc = $category['categories_description']; $categories_string .= '<br>' . $desc . '<br>'; I added that code around line 57. Seems like a reasonable solution, but obviously it doesn't work haha. What am I missing here? Thanks again. Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 5, 2006 Share Posted January 5, 2006 You configure file looks fine. Read through this thread. That is the only other thing that I can think it might be. Your host is retuning some result for the ssl pages that is not recognized by oscommerce. Making the changes mentioned in that thread would fix it. Run the test it mentions first to verify the problem exists. To add a description to the categories box, you would need to edit the code in includes/boxes/categories.php. Find where the category is added and just attached the description to it. However, this is probably not a good idea. The purpose of the box is to give quick links to the categories. With a bunch of text mixed in there, it will be very difficult to navigate, not to mention unattractive. 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 Link to comment Share on other sites More sharing options...
nycreal Posted January 5, 2006 Author Share Posted January 5, 2006 You configure file looks fine. Read through this thread. That is the only other thing that I can think it might be. Your host is retuning some result for the ssl pages that is not recognized by oscommerce. Making the changes mentioned in that thread would fix it. Run the test it mentions first to verify the problem exists. To add a description to the categories box, you would need to edit the code in includes/boxes/categories.php. Find where the category is added and just attached the description to it. However, this is probably not a good idea. The purpose of the box is to give quick links to the categories. With a bunch of text mixed in there, it will be very difficult to navigate, not to mention unattractive. Jack Ok thanks, will take a look at that thread. As for the category descriptions, the effect I was going for was something like this http://www.pedalnet.com. It's very clean looking. And I've been trying to add it the way you described, but to no avail, because I can't have the description hard coded, since it'll change according to which category it is. Hence, my installation of the contrib Category Description. Thanks for your time though! -alex Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 5, 2006 Share Posted January 5, 2006 The description would have to be read in from a table. If you wanted something like that site, then you would need to create a new field to hold a short description. 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 Link to comment Share on other sites More sharing options...
nycreal Posted January 6, 2006 Author Share Posted January 6, 2006 $category_query = tep_db_query("select cd.categories_name, cd.categories_heading_title, cd.categories_description, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . $current_category_id . "' and cd.categories_id = '" . $current_category_id . "' and cd.language_id = '" . $languages_id . "'"); $category = tep_db_fetch_array($category_query); $desc = $category['categories_description']; $categories_string .= '<br>' . $desc . '<br>'; Yeah that's what I was trying to do with the code above. There should already be a field in the database for a short description because I installed the Category Description contrib (that's where I got the above code from to add to the categories.php box) but no string is found. I'm assuming my declarations are wrong, or my calls to retrieve the data from the database are wrong, even though that's pretty much the same code as what's in index.php (added to install Category Description contrib) Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 7, 2006 Share Posted January 7, 2006 That looks OK. If you place the following in the file, do you get the descriptions printed out? echo $dest. '<br>'; 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 Link to comment Share on other sites More sharing options...
nycreal Posted January 9, 2006 Author Share Posted January 9, 2006 That looks OK. If you place the following in the file, do you get the descriptions printed out?echo $dest. '<br>'; Jack no it doesnt =/ i put echo $desc. '<br>'; i figured when u typed $dest it was a typo, but nothing showed Link to comment Share on other sites More sharing options...
Iwant2Lrn Posted January 10, 2006 Share Posted January 10, 2006 There are two steps to installing an ssl cert into a shop: install it on the server and setup the shops configure file. My guess is that your friend did the first but not the second. If you are not sure how to check that, post your includes/configure.php file here, without the database information at the bottom of it. Jack Can anyone tell if I just messed up! I needed to get the original OSC files to do some comparing so I installed the software again. Now it seems I have lost all the changes I have made to site including all the products I added. Did I lose everything or is it still there? Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 10, 2006 Share Posted January 10, 2006 no it doesnt =/ i put echo $desc. '<br>'; i figured when u typed $dest it was a typo, but nothing showed Try entering echo 'rows = ' . tep_db_num_rows($category_query) . '<br>'; right before $category = tep_db_fetch_array($category_query); Do you get a number greater than 0? 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 Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 10, 2006 Share Posted January 10, 2006 Can anyone tell if I just messed up! I needed to get the original OSC files to do some comparing so I installed the software again. Now it seems I have lost all the changes I have made to site including all the products I added. Did I lose everything or is it still there?If you did a complete re-install, which it sounds like you did, then, yes, you lost it all. Rule numbe 1: Always do a backup before making changes. 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 Link to comment Share on other sites More sharing options...
nycreal Posted January 10, 2006 Author Share Posted January 10, 2006 Try entering echo 'rows = ' . tep_db_num_rows($category_query) . '<br>'; right before $category = tep_db_fetch_array($category_query); Do you get a number greater than 0? Jack No I don't :( Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 11, 2006 Share Posted January 11, 2006 The the data is not being pulled from the database. Either it is not there or the conditions of the sql statement are not bieng met. 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 Link to comment Share on other sites More sharing options...
nycreal Posted January 11, 2006 Author Share Posted January 11, 2006 The the data is not being pulled from the database. Either it is not there or the conditions of the sql statement are not bieng met. Jack Hmm... Well I know the data is in the database, because the description shows on the category listing page (as it is intended to be shown with the contrib Category Description)... As for the conditions of the mysql statement, that refers to an IF statement correct? The original code that calls for the description data to be pulled was part of an IF statement, but I deleted that line of code, so there would be no conditions to be met... I most likely did this improperly... Well, thanks for your help! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.