Yougz Posted March 30, 2004 Share Posted March 30, 2004 I am setting up osCommerce on a shared server with sessions stored in mysql. The server URL is something like http://www.mydomain.com/ while the SSL version of the store is https://ssl.hostcompanydomain.net/~mylogin I have problems at the end of an order, when submitting the last 'Continue' button after the order confirmation. The next page should by something like https://ssl.hostcompanydomain.net/~mylogin/catalog/index.php but what appears instead in the browser address bar is https://ssl.hostcompanydomain.net/catalog/index.php and of course an 404 error from the server Any ideas of what might be wrong? Running osCommerce 2.2-MS2 on Apache 1.3.29 and PHP 4.3.4. The test browsers are IE 5.5 on Mac and IE 6 on Windows From config.php define('HTTP_SERVER', 'http://www.mydomain.com'); define('HTTPS_SERVER', 'https://ssl.hostcompanydomain.net'); define('ENABLE_SSL', true); define('HTTP_COOKIE_DOMAIN', 'www.mydomain.com'); define('HTTPS_COOKIE_DOMAIN', 'ssl.hostcompanydomain.net'); define('HTTP_COOKIE_PATH', '/catalog/'); define('HTTPS_COOKIE_PATH', '/~mylogin/catalog'); define('DIR_WS_HTTP_CATALOG', '/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/~mylogin/catalog/'); Thanks in advance, Yougz Link to comment Share on other sites More sharing options...
Yougz Posted April 1, 2004 Author Share Posted April 1, 2004 The problem come from what appears to be a bug to me, in tep_redirect : function tep_redirect($url) { if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url $url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL } } The test should be: if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url $url = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . substr($url, strlen(HTTP_SERVER . DIR_WS_HTTP_CATALOG)); // Change it to SSL } } Anyone agrees ? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.