Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SSL causing probs for catalog and admin


larryl

Recommended Posts

Folks,

I installed 2.2-MS2 thru my web hosting company, running on an apache server.

It does use .htaccess. I got 404 errors when trying to create an account or log

in on the demo page until I changed the line in catalog/includes/configure.php from:

define('enable_ssl' ,true) to define('enable_ssl' ,false)

 

So now I can pretend to run a business. First question: What do I need to change so this is running secure? Here is the rest of this config file.

 

define('HTTP_SERVER', 'http://www.name.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://www.name.com'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL',false); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.name.com');

define('HTTPS_COOKIE_DOMAIN', name.com');

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

define('HTTPS_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', '/xxx/xxx/html/oscommerce/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'xxxxx');

define('DB_SERVER_PASSWORD', 'xxxxx');

define('DB_DATABASE', name_com_-_oscommerce');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

 

Next question. I still cannot access my oscommerce/admin page. Obviously, it asks for a username and password. I figured it would be my admin username/password for the site. It is not. I have an open ticket with the web hosting company to see if they can help. I tried the same trick as above in /admin/includes/configure.php, changing define('enable_ssl_catalog',true), but

it did not work. I still get the login request. Here is the remainder of that file.

 

define('HTTP_SERVER', 'http://www.name.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.com');

define('HTTPS_CATALOG_SERVER', 'https://www.name.com');

define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', '/xxx/xxx/html/oscommerce/'); // where the pages are located on the server

define('DIR_WS_ADMIN', '/oscommerce/admin/'); // absolute path required

define('DIR_FS_ADMIN', '/xxx/xxx/html/oscommerce/admin/'); // absolute pate required

define('DIR_WS_CATALOG', '/oscommerce/'); // absolute path required

define('DIR_FS_CATALOG', '/xxx/xxx/html/oscommerce/'); // 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 empty for productive servers

define('DB_SERVER_USERNAME', 'xxxxx');

define('DB_SERVER_PASSWORD', 'xxxxxx');

define('DB_DATABASE', 'name_com_-_oscommerce');

define('USE_PCONNECT', 'false'); // use persisstent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

One last bit of info. I have been all over the forums, and in one, I saw a caution about using file-manager to edit PHP files, which is, of course, what I have been using. I am careful to only change the text I need to change, but for instance, in applications_top.php in both catalog and admin, I added the define() statements I saw on the forums, by cutting and pasting. Could this be the "root" of my problem?? Here is the salient portion of /catalog/includes/application_top.php, for you perusal.

 

//manual changes per faq site

define('HTTP_SERVER', 'http://www.name.com');

define('HTTPS_SERVER', 'https://www.name.com');

define('ENABLE_SSL', 1);

define('DIR_FS_DOCUMENT_ROOT', '/xxx/xxx/html/oscommerce/');

define('DIR_WS_ADMIN', '/oscommerce/admin/');

define('DIR_WS_CATALOG', '/oscommerce/');

 

define('DB_SERVER', 'localhost');

define('DB_SERVER_USERNAME', 'xxxxx');

define('DB_SERVER_PASSWORD', 'xxxxx');

define('DB_DATABASE', name_com_-_oscommerce');

define('USE_PCONNECT', 1);

 

Here is the similar portion of /admin/includes/application_top.php:

 

define('HTTP_SERVER', 'http://www.name.com');

define('DIR_FS_DOCUMENT_ROOT', '/xxx/xxx/html/oscommerce/');

define('DIR_WS_ADMIN', '/oscommerce/admin/');

define('DIR_WS_CATALOG', '/oscommerce/');

 

define('DB_SERVER', 'localhost');

define('DB_SERVER_USERNAME', 'xxxxx');

define('DB_SERVER_PASSWORD', 'xxxxx');

define('DB_DATABASE', 'name_com_-_oscommerce');

define('USE_PCONNECT', 1);

 

Thanks in advance for your assistance.

Best regards,

Larry

Link to comment
Share on other sites

First check the basics.

 

Can you access your site http://www.whatever.com using https://www.whatever.com ?

 

Several people have spent a lot of time endlessly tweaking their config files when their ssl was not set up right or they misunderstood the method(s) for using shared ssl.

 

ooops... :angry:

 

didn't mean to give those guys a free plug but it does demonstrate the issue.

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

Gentlemen,

I installed OSC from the Control Panel of Web.com, and I did not get a specific notification that SSL was installed. I suspect that this is where the problem is, and have a trouble ticket in.

I do have the IP of the server, etc. When I attempt to look at Https://name.com the index.php does not come up, but instead I get a dialog box to the webhost admin page, where I can successfully login as the admin of the site, change files, and generally get into trouble.

Best,,

Larry

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...