PDA

View Full Version : non SSL to SSL failed for oscommerce


danieln
05-20-2004, 01:46 AM
hi,

i'm totally lost! i had my e-cart working without SSL

but after i get the SSL, then i reconfig to have OSC to use SSL

but this makes some pages to be unable to b viewed. my configure.php file is as below

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
define('HTTP_SERVER', 'http://www.flowerfish.com'); // eg, http://localhost - should not be empty for productive servers
define('HTTPS_SERVER', 'https://secure.flowerfish.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.flowerfish.com');
define('HTTPS_COOKIE_DOMAIN', '');
define('HTTP_COOKIE_PATH', '/');
define('HTTPS_COOKIE_PATH', '');
define('DIR_WS_HTTP_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '');
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/');

the account.php & checkout_shipping.php could not be accessed! it's now pointing to https://secure.flowerfish.com/account.php

i tried to copy this file to the secure_server folder, but still it shows only a blank page.

what am i missing here??

Snarpy
05-20-2004, 02:26 AM
Although I'm sure there is a better way, this is what I did. To get osCommerce working with SSL, I installed it twice, once in the secure directory, and once in the regular one. I did the whole cart because I couldn't figure out which files needed to be on which side.

Like I said, there must be a better way.

Snarpy

danieln
05-20-2004, 02:31 AM
wow!!!

that would double the web space for nothing! u copied all the images over as well??

Snarpy
05-20-2004, 02:54 AM
:o It's not a big cart (as far as products go)...and I corresponded privately with someone else who did the same thing so I'm not the only one :BPG2: Product images get put in once through the admin section - I'm not using all the cutsie images on the pages.

I'm looking at this symlink thing on the other thread... I didn't understand it before, but I think I see what they're saying. Maybe I can mess with it tomorrow....

Snarpy

danieln
05-20-2004, 02:57 AM
haha..

hey i did it & it worked

hope u'll update me if any good solutions u find.

i'll keep looking as well.

sheila
05-20-2004, 09:38 PM
Just to provide some assistance, I thought I would explain how I am using symlinks on a secure site of mine that needs to be accessed both via regular http and also via https.

It is a templated site, and the same images and much of the same code are used under both http and https.

To prevent having to upload all of the images twice and store double copies, I am using symlinks as follows:

I made a directory in my

/big/dom/xdomain/www directory which I call "pix"

Then I upload my images to the

/big/dom/xdomain/www/pix directory.

Then, I went to my

/big/dom/xdomain/www/Secure_Server directory

in a telnet session, and from that directory I created a symlink for the subdirectory "pix" that points to the directory

/big/dom/xdomain/www/pix

From the "man" page for ln
NAME
ln - make links between files

SYNOPSIS
ln [OPTION]... TARGET [LINK_NAME]


To make a "symlink" (which is a soft, or "symbolic" link) you want to use the -s option.

The command I used to create the symlink was as follows:

ln -s /big/dom/xdomain/www/pix pix

Now when someone goes to

http://www.domain.com/pix/mypic.gif

or

https://xdomain.merchantquest.net/pix/mypic.gif

(I'm using a shared certificate, not a private one.)
They see the same image, and I only have to upload a single copy.

I set it up so that my scripts, whether running from the cgi-bin or the cgi-ssl see the root path to that directory as

/pix

This makes the set up sort of parallel for both the http and https access so that the script can switch easily between either type of request.

Hope this is of some help...