Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Configure.php - Correct syntax?


Nic du Toit

Recommended Posts

Somehow the syntax in the following looks incorrect;

 

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

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

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

define('HTTP_COOKIE_DOMAIN', 'mydomian');

define('HTTPS_COOKIE_DOMAIN', 'mydomain');

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

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

define('DIR_WS_HTTP_CATALOG', '/catalog');

define('DIR_WS_HTTPS_CATALOG', '/catalog/');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/');

 

For instance....should catalog (Cookie path) be shown as [ '/catalog/' ], or [ 'catalog/' ] ??

 

I suspect that this file is not set up correctly.

 

Need some advice here!

Thanks,

Nic

I used to be indecisive....but, now I just don't know anymore.

Link to comment
Share on other sites

The cookie path should start and end with a /

 

If it was a root install the cooke path would be a single /

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

The cookie path should start and end with a /

 

If it was a root install the cooke path would be a single /

 

 

Thanks Jim,

I noticed that one of the catalog defines has no trailing / [ ('DIR_WS_HTTP_CATALOG', '/catalog'); ]

I used to be indecisive....but, now I just don't know anymore.

Link to comment
Share on other sites

Since you do not have your own dedicated SSL cert, use your shared ssl server address not your domain.

 

define('HTTPS_SERVER', 'https://shared ssl domain'); 

 

Ask your host for the proper cookie format of the shared ssl.

 

 define('HTTPS_COOKIE_DOMAIN', 'shared ssl domain with your store path');

 

Your catalog pages and checkout pages generate different session ids(osCsid). The moment your customers go to checkout, they'll lose the session id (thus losing their cart) but gain a different session id for a different section of your catalog.

 

Check your cookies and see.

Link to comment
Share on other sites

Since you do not have your own dedicated SSL cert, use your shared ssl server address not your domain.

 

define('HTTPS_SERVER', 'https://shared ssl domain'); 

 

Ask your host for the proper cookie format of the shared ssl.

 

 define('HTTPS_COOKIE_DOMAIN', 'shared ssl domain with your store path');

 

Your catalog pages and checkout pages generate different session ids(osCsid). The moment your customers go to checkout, they'll lose the session id (thus losing their cart) but gain a different session id for a different section of your catalog.

 

Check your cookies and see.

 

 

Thanks Bryce.... In a roundabout way I got my answer on another post I made on this forum....,

Namely the 'your cart is empty' syndrome :thumbsup:

 

Thanks for your response...I'll check with ixwebhosting.

 

Nic

I used to be indecisive....but, now I just don't know anymore.

Link to comment
Share on other sites

And with shared SSL you can't set "Force cookie use" to true in the admin so don't try - it will never work.

 

That only works with dedicated SSL.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

And with shared SSL you can't set "Force cookie use" to true in the admin so don't try - it will never work.

 

That only works with dedicated SSL.

 

 

Thanks for that..... I've changed it to 'false'

So, the / before and after catalog is fine?

The cookie file is in [ mydomain/admin ] so I reckon the / should be both sides?

 

Anyway, i've lodged a trouble ticket with ixwebhosting regarding the cookie path and SSL.

I used to be indecisive....but, now I just don't know anymore.

Link to comment
Share on other sites

Try these cookie settings:

 

  define('HTTP_COOKIE_DOMAIN', '.musicshop.etsga.org');
 define('HTTPS_COOKIE_DOMAIN', '.musicshop.c4.ixwebhosting.com');
 define('HTTP_COOKIE_PATH', '/catalog/');
 define('HTTPS_COOKIE_PATH', '/catalog/');

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Part of your problem might be the screwed up URL's.

 

In your Admin, set 'Use Search-Engine Safe URLs (still in development)' to false.

 

Save it.

 

Sometimes you have to set 'Use Cache' to false (or clear the cache) to see any change.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Part of your problem might be the screwed up URL's.

 

In your Admin, set 'Use Search-Engine Safe URLs (still in development)' to false.

 

Save it.

 

Sometimes you have to set 'Use Cache' to false (or clear the cache) to see any change.

 

 

Thanks!... I've made all the necessary changes. Let's hope for the best!

I used to be indecisive....but, now I just don't know anymore.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...