Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cookie Usage Page


Guest

Recommended Posts

I have a vanilla install of OSC 2.2 RC2a that is installed under wamp on my pc.

 

When I go to admin sessions and set Force Cookie Use to True, and then go to the catalog and go to my account, I get the Cookie Usage page that tells me to set the options in my browser. The options are already set the way they are supposed to be.

 

This is the same browser that I use for all sites, including my site on the web that has the force cookie use set to true. I do not get the cookie usage page there.

 

Anyone had this, or knows how to fix.

Link to comment
Share on other sites

What's your browser? (Since the cookie page only mentions IE, I'm guessing IE. Is it IE 6 or 7?)

I say not to you, "backup your files before you change them." I say, rather, "use Subversion, and never worry about ruining your files again."

Link to comment
Share on other sites

What's your browser? (Since the cookie page only mentions IE, I'm guessing IE. Is it IE 6 or 7?)

IE6, which works on my web site, and on my patched to RC1 test site, but not on my RC2a test site.

Link to comment
Share on other sites

Does it happen in other browsers? (IE 7, Firefox, Opera?)

I say not to you, "backup your files before you change them." I say, rather, "use Subversion, and never worry about ruining your files again."

Link to comment
Share on other sites

Does it happen in other browsers? (IE 7, Firefox, Opera?)

It does happen in firefox.

 

Ryan, it is not the browser. It is the site.

 

Same browser different sites, differnt osc versions, common factor RC2a

Link to comment
Share on other sites

Just trying to narrow it down. Knowing if it's a browser-specific issue helps.

 

Unfortunately, since it's not a browser-specific issue, and I don't have any experience with RC2a, I won't be much help. Sorry. :(

I say not to you, "backup your files before you change them." I say, rather, "use Subversion, and never worry about ruining your files again."

Link to comment
Share on other sites

Just trying to narrow it down. Knowing if it's a browser-specific issue helps.

 

Unfortunately, since it's not a browser-specific issue, and I don't have any experience with RC2a, I won't be much help. Sorry. :(

Thank you for taking the time to look.

Link to comment
Share on other sites

I have a vanilla install of OSC 2.2 RC2a that is installed under wamp on my pc.

 

When I go to admin sessions and set Force Cookie Use to True, and then go to the catalog and go to my account, I get the Cookie Usage page that tells me to set the options in my browser. The options are already set the way they are supposed to be.

 

This is the same browser that I use for all sites, including my site on the web that has the force cookie use set to true. I do not get the cookie usage page there.

 

Anyone had this, or knows how to fix.

 

OK, so this can not be an issue with RC2a. Any advice appreciated. Really.

Link to comment
Share on other sites

I have a vanilla install of OSC 2.2 RC2a that is installed under wamp on my pc.

 

When I go to admin sessions and set Force Cookie Use to True, and then go to the catalog and go to my account, I get the Cookie Usage page that tells me to set the options in my browser. The options are already set the way they are supposed to be.

 

This is the same browser that I use for all sites, including my site on the web that has the force cookie use set to true. I do not get the cookie usage page there.

 

Anyone had this, or knows how to fix.

Further info, I can create an account but cannot log in as a customer.

Link to comment
Share on other sites

OK. Now, I feel like I can be a little more helpful. :)

 

I just went through something similar when I tried to enable the "Force use cookies" setting. I wanted to do this to stop the Session ID from being appended to the URL. However, after I did this, I started getting redirected to the cookie page whenever I tried to add things to my cart. What I found is that the cookies weren't getting set, and the sessions weren't sticking. Both stemmed from a misconfiguration.

 

To be clear: I wasn't having any problems when accessing my site (still under development) from my web host. My problems were on my local development machine. This is what I found:

 

1) My web host differed in its session configuration from my local machine in only one instance: the session.use_trans_sid was set to one instead of zero. Changing this value to 1 on my machine fixed Firefox.

 

2) In my configure.php file, I'd set HTTP_COOKIE_DOMAIN like so:

define('HTTP_COOKIE_DOMAIN', $_SERVER['SERVER_ADDR']);

This resolves to 127.0.0.1, which is mostly equivalent to localhost. However, when it comes to certain things they're not the same at all. For example, some browsers (like Safari) considered it to be a separate domain from localhost (which is what I type in the address bar for convenience) and so rejected the cookie. The fix in that case was to set HTTP_COOKIE_DOMAIN to '' instead.

 

Now, your case may be different, but hopefully my experience will help point you in the right direction. Print out the contents of the $_SESSION and $_COOKIE arrays, examine the contents of your browser's cookies, and see what is and isn't getting set. Look at your PHP session configuration by calling phpinfo() in a php file and searching for "session". Examine the session settings in the admin tool. This is likely where your problem lies.

I say not to you, "backup your files before you change them." I say, rather, "use Subversion, and never worry about ruining your files again."

Link to comment
Share on other sites

OK. Now, I feel like I can be a little more helpful. :)

 

I just went through something similar when I tried to enable the "Force use cookies" setting. I wanted to do this to stop the Session ID from being appended to the URL. However, after I did this, I started getting redirected to the cookie page whenever I tried to add things to my cart. What I found is that the cookies weren't getting set, and the sessions weren't sticking. Both stemmed from a misconfiguration.

 

To be clear: I wasn't having any problems when accessing my site (still under development) from my web host. My problems were on my local development machine. This is what I found:

 

1) My web host differed in its session configuration from my local machine in only one instance: the session.use_trans_sid was set to one instead of zero. Changing this value to 1 on my machine fixed Firefox.

 

2) In my configure.php file, I'd set HTTP_COOKIE_DOMAIN like so:

define('HTTP_COOKIE_DOMAIN', $_SERVER['SERVER_ADDR']);

This resolves to 127.0.0.1, which is mostly equivalent to localhost. However, when it comes to certain things they're not the same at all. For example, some browsers (like Safari) considered it to be a separate domain from localhost (which is what I type in the address bar for convenience) and so rejected the cookie. The fix in that case was to set HTTP_COOKIE_DOMAIN to '' instead.

 

Now, your case may be different, but hopefully my experience will help point you in the right direction. Print out the contents of the $_SESSION and $_COOKIE arrays, examine the contents of your browser's cookies, and see what is and isn't getting set. Look at your PHP session configuration by calling phpinfo() in a php file and searching for "session". Examine the session settings in the admin tool. This is likely where your problem lies.

Thanks ryos, I will check this out and post back.

Link to comment
Share on other sites

I had the same problem 2 days ago using RC2. Funny thing, everything works fine in my laptop but not on a live server.

Anyways, I found this and it helped.

 

http://www.oscommerce.com/forums/index.php?showtopic=238917

Thank you BryceJr.

 

The post that you linked to had a link to here.

This explained that the domain names must contain at least two dots (.), hence 'localhost' is invalid

 

This may explain why my test sites worked (dummy domain name, such as coopco.pcname), and the RC2a sites did not work (no dummy domain name, such as rc2a_test)

 

Will have to check this out further.

Link to comment
Share on other sites

Thank you BryceJr.

 

The post that you linked to had a link to here.

This explained that the domain names must contain at least two dots (.), hence 'localhost' is invalid

 

This may explain why my test sites worked (dummy domain name, such as coopco.pcname), and the RC2a sites did not work (no dummy domain name, such as rc2a_test)

 

Will have to check this out further.

Hi BryceJr

 

Nothing that I posted in the previous post fixed the problem. However, the code in the post that you linked to worked brilliantly.

 

For me the probelm is solved on my local machine. Now I must remember to change it back when I transfer it to the web.

Link to comment
Share on other sites

Hi BryceJr

 

Nothing that I posted in the previous post fixed the problem. However, the code in the post that you linked to worked brilliantly.

 

For me the probelm is solved on my local machine. Now I must remember to change it back when I transfer it to the web.

 

If it's any help I too ran into the cookie issue on my local box (xampp, OS X). It turned out to be exactly what you documented above.

 

I had entered a local machine name of devsite and all worked well up until throwing something into the cart where it would throw the cookie error in all available browsers.

 

Changing it to www.devsite.com or even site.dev works fine.

 

Never saw an issue on 127.0.0.1 though.

 

For what it's worth,

Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

If it's any help I too ran into the cookie issue on my local box (xampp, OS X). It turned out to be exactly what you documented above.

 

I had entered a local machine name of devsite and all worked well up until throwing something into the cart where it would throw the cookie error in all available browsers.

 

Changing it to www.devsite.com or even site.dev works fine.

 

Never saw an issue on 127.0.0.1 though.

 

For what it's worth,

Iggy

I tried changing to RC2a.test for the site name and that did not work for me. I just do not understand why it did not work.

Anyway, thanks for documenting your experiences, it may help some other hapless soul in the future.

Link to comment
Share on other sites

  • 1 month later...
I tried changing to RC2a.test for the site name and that did not work for me. I just do not understand why it did not work.

Anyway, thanks for documenting your experiences, it may help some other hapless soul in the future.

 

I have problem with earlier version, osCommerce version MS2.something...

Link to comment
Share on other sites

  • 3 years later...

I'm having a similar issue with my website.

 

I enabled cookie use from admin page, but now when I go back to admin page, I can't seem to log back in to do anything. It just redirects me to the admin login page again.

 

Could someone help please ?

 

Is there a way to turn off force cookie use manually? (through database, etc...)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...