Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

almost secure site! one more thing....


prof3ta

Recommended Posts

I have been browsing through the forums A LOT reading endless threads, and thanks to all the previous posters, it has well paid off. I've finally managed to make the site go to an https "secure" connection after customers try to Check Out. Problem is, I get what looks like a 404 not found page (withouth the 404). "The requested document was not found on this server" referring to checkout_shipping.php

I know it's there and it works, cause my site was working just fine before i tried to install ssl and https.

Any ideas on how i can fix this?

 

I dare post my /includes/configure.php

<?php
       define('HTTP_SERVER', 'http://reptilemax.com');
       define('HTTPS_SERVER', 'https://reptilemax.com');
       define('ENABLE_SSL', 'true');
       define('HTTP_COOKIE_DOMAIN', 'reptilemax.com');
       define('HTTPS_COOKIE_DOMAIN', 'reptilemax.com'); //according to post i read, get rid of http://
       define('HTTP_COOKIE_PATH', '/osCommerce/');
       define('DIR_WS_HTTP_CATALOG', '/osCommerce/');
       define('DIR_WS_HTTPS_CATALOG', '/osCommerce/');
       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', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
       define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
       define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

as well as my /admin/includes/configure.php

<?php
       define('HTTP_SERVER', 'http://reptilemax.com');
       define('HTTP_CATALOG_SERVER', 'http://reptilemax.com');
       define('HTTPS_CATALOG_SERVER', 'https://reptilemax.com');
       define('ENABLE_SSL_CATALOG', 'false');
       define('DIR_FS_DOCUMENT_ROOT', '/home/httpd/vhosts/reptilemax.com/httpdocs');
       define('DIR_WS_ADMIN', '/osCommerce/admin/');
       define('DIR_FS_ADMIN', '/home/httpd/vhosts/reptilemax.com/httpdocs/osCommerce/admin');
       define('DIR_WS_CATALOG', '/osCommerce/');
       define('DIR_FS_CATALOG', '/home/httpd/vhosts/reptilemax.com/httpdocs/osCommerce/');
       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/');

 

thanks for your time ;)

Link to comment
Share on other sites

You need to find out how your particular web host supports SSL. Each is a little different, some don't do it at all. Some let you install your own certificate (which you buy), others let you use a shared certificate.

Link to comment
Share on other sites

You're missing a line:

 

define('HTTPS_COOKIE_PATH', '/osCommerce/');

 

put it under

 

define('HTTP_COOKIE_PATH', '/osCommerce/');

 

just to be consistent.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

I do have an ssl certificate, it evens pops up the window prompting you that your about to enter taht SSL part. the problem is after they click they cant reach the page. I included the

 

define('HTTPS_COOKIE_PATH', '/osCommerce/');

 

line to my configure.php and still nothing.

Maybe you guys could get a better feel of what i mean if you go to my site:

 

www.reptilemax.com

 

Add an item to your cart and try to Check Out.

 

I'll be waiting...

Link to comment
Share on other sites

okay, im not sure if your webhost uses the same thing, but for my webhost there were two things I had to do

 

the first was to find out from my webhost the URL of the SSL certificate/server (im using their shared certificate)

 

the second was to change the configuration in the OSC files. This is what it says on my webhost FAQs

 

To enable ssl in OSCommerce you need to modify the file

http://YOURDOMAIN/shop/includes/configure.php

 

# You need to change

 

define('HTTPS_SERVER', 'http://YOURDOMAIN');

 

# to

 

define('HTTPS_SERVER', 'https://SECURE_SERVER_URL_HERE');

 

# and change

 

define('ENABLE_SSL', 'false');

 

# to

 

define('ENABLE_SSL', 'true');

 

From the code you posted it appears you are still using your domain name rather than a secure server url for the HTTPS server.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...