Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Empty cart in IE only


reverseracer

Recommended Posts

I need to suggestions on where to look next. I have spent the last 2 weeks eaching these forums for information. I have tried everything I found.

 

My problem is once logged in a user is able to select products to be added to the cart. Using Firefox as a browser the site works fine. Using IE I get "cart empty" for any new items added.

 

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

define('HTTPS_SERVER', 'https://scrapbookersparadise.com.au');

define('ENABLE_SSL', 'true');

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

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

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

define('HTTP_COOKIE_DOMAIN', 'www.scrapbookersparadise.com.au');

define('HTTPS_COOKIE_DOMAIN', 'scrapbookersparadise.com.au');

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/');

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', DIR_WS_CATALOG . 'pub/');

define('DIR_FS_DOCUMENT_ROOT', '/home/scrapbk/public_html/');

define('DIR_FS_CATALOG', '/home/scrapbk/public_html/');

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');

define('DB_SERVER_USERNAME', 'xxxxx);

define('DB_SERVER_PASSWORD', xxxxxx);

define('DB_DATABASE', 'xxxxxxxxxxxxx');

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

define('STORE_SESSIONS', 'mysql');

 

My admin settings are:

Session Directory /tmp

Force Cookie Use False

Check SSL Session ID False

Check User Agent False

Check IP Address False

Prevent Spider Sessions True

Recreate Session False

 

I have looked at register_globals and although set on (phpinfo()) a getenv(register_globals) returns NULL. I have updated the application_top.php and General.php (getenv('SERVER_PORT') == '443') to see if I could change the effect. No difference.

 

I'm at a loss as the symptom only appears on IE. The cookie settings on IE are Allow everything inc sessions.....Firefox is standard config.

 

I have found that I can get it the cart to show if I copy n' paste the osCsid value to the URL http://www.scrapbookersparadise.com.au/cat...opping_cart.php which is returned from "add to cart" buttons. Interestingly the same URLs are diplayed in Firefox yet it work fine without any intervention.

Link to comment
Share on other sites

Strange... have the same problem.

 

Using I.E.

 

Created a testbed of 4 products... not logged in... add them to the cart, all is fine. Goto "checkout" and log in. During login, it goes over to SSL. Once I am logged in, the cart is empty. If I add any items logged in, it does not save them and I go back to non-ssl.

 

Anyone have a clue?

 

If someone would like to please look and test:

http://www.aestechnologies.net/store

 

I cannot figure this one out.

Link to comment
Share on other sites

Found the fix, dug deep in the site here. Maybe a faq for the ol' .info site

 

Change the following below in store/includes/configure to this:

 

define('HTTP_COOKIE_DOMAIN', '.mysite.com');
define('HTTPS_COOKIE_DOMAIN', '');
define('HTTP_COOKIE_PATH', '/');
define('HTTPS_COOKIE_PATH', '');

 

Change mysite.com to your website.

Link to comment
Share on other sites

Unfortunately Joseph this does not make a difference.

 

I have tried to debug this by removing all refernce to SSL and database sessions as per the following config.php.

 

The result is the same - works in Firefox, but not IE.

 

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

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

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

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

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

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

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

// define('HTTP_COOKIE_DOMAIN', 'www.scrapbookersparadise.com.au');

// define('HTTPS_COOKIE_DOMAIN', 'scrapbookersparadise.com.au');

// 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/');

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', DIR_WS_CATALOG . 'pub/');

define('DIR_FS_DOCUMENT_ROOT', '/home/scrapbk/public_html/');

define('DIR_FS_CATALOG', '/home/scrapbk/public_html/');

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', 'xxxx');

define('DB_SERVER_PASSWORD', 'xxxx');

define('DB_DATABASE', 'xxxxxx');

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

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

Link to comment
Share on other sites

Hi, Have your purchased a full ssl certificate? If you haven't then you need to change the https server to your shared ssl pathway, and leave the https cookie domain blank.

 

You're not 'debugging' by removing essential parts of the configure.php file. These settings should be like so:

 

define('HTTPS_SERVER', 'https://scrapbookersparadise.com.au'); //if using shared ssl then enter correct pathway here

define('ENABLE_SSL', 'true');

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

define('HTTPS_COOKIE_PATH', '/catalog/'); //if using shared ssl then leave this blank

define('HTTP_COOKIE_DOMAIN', 'scrapbookersparadise.com.au');

define('HTTPS_COOKIE_DOMAIN', 'scrapbookersparadise.com.au'); //if using shared ssl then leave this blank

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

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

define('STORE_SESSIONS', 'mysql');

 

Vger

Link to comment
Share on other sites

Vger,

 

The site uses a dedicated SSL certificate.

 

Unfortunatley your suggestions did not work.

 

I'm not sure if everyone understands that the site works fine under Firefox, but not IE. Like I have stated eariler the manual editing of the browser URL to include the CSid allowed IE to show the cart contents.

 

Hence, the area I have been looking at is why does IE have an issue with sessions with all the configs suggested (including mine), but not with Firefox ?

 

I did find the following .htaccess document in the /catalog directory. Has some interesting reference to IE. Has anyone seen this before and know the effect ?

 

# This is used with Apache WebServers

#

# For this to work, you must include the parameter 'Options' to

# the AllowOverride configuration

#

# Example:

#

# <Directory "/usr/local/apache/htdocs">

# AllowOverride Options

# </Directory>

#

# 'All' with also work. (This configuration is in the

# apache/conf/httpd.conf file)

 

# The following makes adjustments to the SSL protocol for Internet

# Explorer browsers

 

<IfModule mod_setenvif.c>

<IfDefine SSL>

SetEnvIf User-Agent ".*MSIE.*" \

nokeepalive ssl-unclean-shutdown \

downgrade-1.0 force-response-1.0

</IfDefine>

</IfModule>

 

# Fix certain PHP values

# (commented out by default to prevent errors occuring on certain

# servers)

 

#<IfModule mod_php4.c>

# php_value session.use_trans_sid 0

# php_value register_globals on

#</IfModule>

Link to comment
Share on other sites

That .htaccess file is the default osCommerce .htaccess file and has nothing to do with your problem. Whether the changes I gave you resolved your problem or not they are the correct settings for your configure.php file - so you should be using them (see the one suggested change below).

 

The fact that the shopping cart works with Firefox does not mean a great deal. File pathways and the interpretation of them is the one area where IE is more exacting than Mozilla based browsers. You can get away with bad file pathways in Firefox but not in IE.

 

The fact that it is the Shopping Cart which is bugging out leads me to look at the cookie settings. Try this:

 

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

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

 

Vger

Link to comment
Share on other sites

Vger,

 

made the change, unfortunately the result is the same.

 

Is there anything else you can think of that may help to narrow down the problem ? Perhaps some diagnostic code to display what it is doing ?

 

If I login and go to the cart I can see the contents from the previous login, incluing the item I selected to "buy" ironically it getts added anyway. It only apears to be when I select "buy" or "add to cart" on either product page that I have the problem.

Link to comment
Share on other sites

Ok found some more details.

 

I took off SSL in both the catalog and admin configuration.php

 

When logging in and browsing products as wel as visiting the cart (with contents) my session ID is : osCsid=5874b4aa4462ba8f34d559f8ae196a99

 

Once I select a product and add to the cart or buy now the URL changes to a new session ID of : osCsid=333746b2860f4d12a174a0d28c1bc524

 

so for some reason my sessions appear to be muddled up

 

strangly my SSL icon appears on the login.php and on the subsequent index.php but not again. I did not expect to see any SSL (https) page references. Are these two issues linked or do I have a different problem now?

 

my configs remain as Vger suggested, except for the SSL = false change.

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...
  • 3 weeks later...

I have this problem in IE and Firefox. I just noticed it a week ago, I know it worked fine in the past. Yesterday I thought I had it worked out in Firefox, but today I am in the same condition.

 

Very strange .... the same configure.php. It worked yesterday but not now.

 

define('HTTP_SERVER', 'http://www.e-BeauShop.com/'); // eg, http://localhost - should not be empty

for productive servers

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

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

define('HTTP_COOKIE_DOMAIN', 'www.e-BeauShop.com/');

define('HTTPS_COOKIE_DOMAIN', '');

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

define('HTTPS_COOKIE_PATH', '');

 

I found another discussion/bug reports on this:

http://www.oscommerce.com/community/bugs,3...abase+(General)

 

Apparently there are more people having this problems.

Any help will be greatly appreciated ... please.

 

Ninique

Link to comment
Share on other sites

Ninique - this isn't a bug, you've got the configure.php file set up wrongly (there are no capital letters in domain names).

 

define('HTTP_SERVER', 'http://www.e-beaushop.com/');

define('HTTP_COOKIE_DOMAIN', 'www.e-beaushop.com/');

 

define('HTTP_COOKIE_PATH', '/tmp/'); Is your website in a folder called 'tmp'? If not then it's '/' if your site is in the root or something like '/catalog/' if in a folder.

 

Vger

Link to comment
Share on other sites

I have just got it right! My website works very nicely and hopefully it will stay like this.

yeap, I just understood that no capital letters in domain names, mine is very fancy.

I don't have folder tmp: so "define('HTTP_COOKIE_PATH', '/'); " is better.

Then I left the define('HTTP_COOKIE_DOMAIN', ''); - blank

After these changes, the login problems disappeared, but then I had another problem

with authorized.net. The relay response got confused with the changes.

 

After 3 phone calls to authorized.net, I know I can just get rid of the relay response.

Thank you, your suggestions are very helpful.

 

Ninique

Link to comment
Share on other sites

  • 2 weeks later...
I have just got it right! My website works very nicely and hopefully it will stay like this.

yeap, I just understood that no capital letters in domain names, mine is very fancy.

I don't have folder tmp: so "define('HTTP_COOKIE_PATH', '/'); " is better.

Then I left the define('HTTP_COOKIE_DOMAIN', ''); - blank

After these changes, the login problems disappeared, but then I had another problem

with authorized.net. The relay response got confused with the changes.

 

After 3 phone calls to authorized.net, I know I can just get rid of the relay response.

Thank you, your suggestions are very helpful.

 

Ninique

 

 

I just wanted to bump this post - and reference --- remove session id from url, remove oscsid from url. I used this and it worked perfecty!!

 

Thanks,

Kristine

Kristine

Link to comment
Share on other sites

  • 5 months later...

this must be a warning message on the top

 

Warning: I am able to write to the configuration file:/includes/configure.php. This is a potential security risk - please set the right user permissions on this file.

 

 

after make the configure,php chmod 644 ,and clear the ie cookie ,it useful.

 

another problem is that ,you couldn't get two diffrent web on two site ,that the two site on the same server .one will going well ,and another will show cookie problem.

Link to comment
Share on other sites

  • 1 month later...

Thanks for the creation and the continuous modernization of this "contrib".

I have noticed that on some serveur the option:

"Options +FollowSymLinks "

It does not work, from error.

Removing it all it returns to work, and also SEO_URL works, therefore I wondered to what served, not having found of the bad ones you operations.

 

Excused my English

.htaccess : 'only seo add'

# Ultimate SEO URLs BEGIN
<IfModule mod_rewrite.c>
 Options +FollowSymLinks
 RewriteEngine On 
 RewriteBase /catalog/
 RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
 RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
 RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
 RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}
 RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
 RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
 RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
 RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
 RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}
# Ultimate SEO URLs END
# Added to fix article glitch on sub-articles (lonniew at gmail dot com)
 RewriteRule ^(.*)-t-([0-9]+_[0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
</IfModule>

Link to comment
Share on other sites

  • 3 years later...

Hi,

 

I'm newbie and have a huge problem with IE and oscommerce.

 

It only gives one or two possibility in IE to add products to cart, then...nothing. This sounds like a cookie problem to me (Chrome and FF are ok). I'm using oscommerce in intranet and with mod_auth_sspi and adLDAP. Login works great as long as I don't force cookie use in admin panel.

 

And my includes/configure.php looks like this:

 

<?php
 define('HTTP_SERVER', 'http://laitetilaukset');
 define('HTTPS_SERVER', 'http://laitetilaukset');
 define('ENABLE_SSL', false);
 define('HTTP_COOKIE_DOMAIN', 'laitetilaukset');
 define('HTTPS_COOKIE_DOMAIN', 'laitetilaukset');

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

 //these I have tried also, without any luck:
 //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/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', 'C:/htdocs/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 define('DB_SERVER', 'localhost');
 define('DB_SERVER_USERNAME', 'xxx');
 define('DB_SERVER_PASSWORD', 'xxx');
 define('DB_DATABASE', 'xxx');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');
?>

 

Could someone help me with this?

 

Regards,

 

Pauliina

Link to comment
Share on other sites

  • 1 month later...

Archived

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

×
×
  • Create New...