cherven Posted November 11, 2002 Posted November 11, 2002 I can't get the SSL to work with the Admin tools, it works fine with the Catalog, but not with admin tools. i changed the file catalog/admin/includes/configure.php to enable SSL but when i test it it don't work..... Please HELP!!! Thank You.
Trusten Posted November 11, 2002 Posted November 11, 2002 calm down. make sure of a few things. (btw, try not to duplicate a post) 1. do you have the admin folder on the SSL side? 2. in the admin/includes/configure.php (take out your domain name if you want), but the very top, try to paste it here. DON'T POST PASSWORDS or anyting else. btw. what sort of 'don't work' error message do you get?
cherven Posted November 11, 2002 Author Posted November 11, 2002 I'm not getting no error message, it just loads in the nonSSL URL (ex. It Loads in HTTP not HTTPS) I mite be doing something wrong, i mite be loading it the wrong way, I dont know Here is the code: <?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 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://jandssoftware.com'); // eg, http://localhost - should not be NULL for productive servers define('HTTPS_SERVER', 'https://w3http.net/jands'); // eg, https://localhost - should not be NULL for productive servers define('HTTP_CATALOG_SERVER', 'http://jandssoftware.com'); define('HTTPS_CATALOG_SERVER', 'https://w3http.net/jands'); define('ENABLE_SSL', 'true'); // secure webserver for administration tool define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', '/home/cherven/www/store'); // where the pages are located on the server define('DIR_WS_ADMIN', '/store/catalog/admin/'); // absolute path required define('DIR_FS_ADMIN', '/home/cherven/www/store/catalog/admin/'); // absolute pate required define('DIR_WS_CATALOG', '/store/catalog/'); // absolute path required define('DIR_FS_CATALOG', '/home/cherven/www/store/catalog/'); // 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', 'localhost'); // eg, localhost - should not be NULL for productive servers define('DB_SERVER_USERNAME', 'user'); define('DB_SERVER_PASSWORD', 'password'); define('DB_DATABASE', 'database'); define('USE_PCONNECT', 'false'); // use persisstent connections? define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql' ?>
wkrecords Posted November 11, 2002 Posted November 11, 2002 ya info has nothing in it have it true in catalog file aswell
Trusten Posted November 11, 2002 Posted November 11, 2002 define('HTTP_CATALOG_SERVER', 'http://jandssoftware.com'); define('HTTPS_CATALOG_SERVER', 'https://w3http.net/jands'); define('ENABLE_SSL', 'true'); // secure webserver for administration tool I think he means this. in the catelog/includes/configure.php you need to make define('ENABLE_SSL', 'true'); but i'm not sure i get you. is the catelog going to SSL areas when you click something like 'my account', or is it that the admin keeps loading into the non SSL areas when you click something like 'tools'? give me a sec to see your code.
cherven Posted November 11, 2002 Author Posted November 11, 2002 It works just fine in the Catalog, but not in the admin tools. i already have it set in catelog/includes/configure.php and it works fine in the catalog. i dont know why this is happening. please help me out. Thank You
wkrecords Posted November 11, 2002 Posted November 11, 2002 is your server secure? has your webhost givin you a Secure server? the warning in admin is if it aint secure you wouldnt get a warning in catalog if it wasnt secure anyway less you have ya explorer do that So either get a Secure server enabled or get account at like 2checkout.com hope this helps -kevin
Trusten Posted November 11, 2002 Posted November 11, 2002 alright, i see it. alright, careful. IN ADMIN ONLY!! admin/includes/configure.php ONLY if this is your problem. 1. if you try to go to 'tools' on the admin side and you get sent to http://mysite.com/admin/tools.php instead of https://mysite.com/admin/tools.php here goes, in your code up above, find this define('HTTP_SERVER', 'http://jandssoftware.com'); // eg, http://localhost - should not be NULL for productive servers define('HTTPS_SERVER', 'https://w3http.net/jands'); // eg, https://localhost - should not be NULL for productive servers replace it with this define('HTTP_SERVER', 'https://jandssoftware.com'); // eg, http://localhost - should not be NULL for productive servers define('HTTPS_SERVER', 'https://w3http.net/jands'); // eg, https://localhost - should not be NULL for productive servers tell me if that works.
cherven Posted November 11, 2002 Author Posted November 11, 2002 it still don't work. Please Try to figure it out wile i'm gone. Thank You.
Trusten Posted November 11, 2002 Posted November 11, 2002 what does your SSL folder look like, for example, mine looks like this mysite.com/httpsdocs/ what's your look like. and to make things clear, when you use the catelog and go to my account, it brings you to a SSL connection, right?
cherven Posted November 12, 2002 Author Posted November 12, 2002 the SSL URL is https://w3http.net/jands it accesses the same files in the NON SSL Dir, (ex. my logo URL in HTTP is: http://jandssoftware.com/logo.gif , and the URL in HTTPS is: https://w3http.net/jands/logo.gif ...... There both one file, i did not have to upload two different files (Go ahead and test the url's)) Yes, when i click on My Acount in the catalog the SSL works just fine Please HELP. Thank You. PS. the SSL URL is not https://jandssoftware.com it is https://w3http.net/jands
Trusten Posted November 12, 2002 Posted November 12, 2002 is it still a test store or do you have data in it? i wanted to see what you mean. the admin area is where you say you have trouble. i mean the ROOT of the folders.... like this '/home/cherven/www/store' is the ssl side '/home/cherven/wwws/store' that's what i mean? what's the name of the root area of the SSL files?
cherven Posted November 12, 2002 Author Posted November 12, 2002 it is the same as the non ssl it should be: /home/cherven/www/ I'll set up a temp user & password for you, give me 5 min
Guest Posted November 14, 2002 Posted November 14, 2002 I can't get the SSL to work with the Admin tools, it works fine with the Catalog, but not with admin tools. i changed the file catalog/admin/includes/configure.php to enable SSL but when i test it it don't work..... Please HELP!!! Thank You. I had the same problem, and found a solution that works for me. In admin/index.php, right above line 69 <title><?php echo TITLE; ?></title> I inserted this, using part of the code from down around line 182 that checks whether you're in SSL mode. <?php if (getenv('HTTPS') == 'on') { echo ""; } else { echo "<meta http-equiv=refresh content=0,"https://secure.domain.com/catalog/admin/index.php">"; } ?> So, if the browser is already in secure mode, nothing happens, but if not, the redirect will take you there immediately. Hope it works for you, too.
Trusten Posted November 14, 2002 Posted November 14, 2002 oh, we found the problem after some heavy searching. it was a shared SSL and no matter what we did, the configure file wouldn't be recongized. we delete configure, it asks us for configure, we change configure, nothing happened. so finally we made configure a blank file, still, the site was working full force. it was like a ghost. turns out, there was a 'local' folder, with a configure.php file that was actually configuring it. don't ask me, i donno. but we got the SSL thingy working now, finally.
mera_yar Posted November 14, 2002 Posted November 14, 2002 I was having the same problem. I used the code supplied by webguy and it works just fine now. Thanks webguy!! :)
Acorn Posted December 7, 2002 Posted December 7, 2002 I was having what I think was the same problem. Even if I started my Admin/index.php page in https, all the links would go to nonssl. I'm not using a shared certificate, so that wasn't my problem. I tried the code by Webguy, and that helped only to change the first page to ssl if I happened to start in non-ssl. Still, all link, including order reviews, etc., were still linked as http instead of https. I finally noticed that in functions/html_output.php, the function that creates the links, tep_href_link, by default goes to a nonssl version unless the request specifically states it should go to ssl. Changing the default to "SSL" fixed most of the links. Some, though, specifically were setup to go to nonssl. Anyone know why this would be? For Admin, I figured it might be best just to stay in SSL the whole time. So, I finally ended up fixing ALL the links by commenting out the three lines before and after the if statement regarding whether SSL was enabled or not. This becomes: // if ($connection == 'NONSSL') { // $link = HTTP_SERVER . DIR_WS_ADMIN; // } elseif ($connection == 'SSL') { if (ENABLE_SSL == 'true') { $link = HTTPS_SERVER . DIR_WS_ADMIN; } else { $link = HTTP_SERVER . DIR_WS_ADMIN; } // } else { // die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link('' . $page . '', '' . $parameters . '', '' . $connection . '')</b>'); // } By doing that, as long as I've told it in the config that I want SSL enabled, all links will goto SSL. Is there any reason I would NOT want it this way in Administration?
Acorn Posted December 7, 2002 Posted December 7, 2002 Oops -- when I posted the message above, I meant to say the IDEA from the webguy post worked for the index page only. Actually, the code itself made my index page just keep reloading in a loop. Not sure why. Instead, I used a normal redirect at the top of the php code on index.php as follows: <?php if (getenv('HTTPS') == 'on') { echo ""; } else { Header("Location:https://www.mydomain.com/admin/index.php"); } ?> [/code]
Recommended Posts
Archived
This topic is now archived and is closed to further replies.