Session gets clear in category page only in Magento - magento

I have one problem in Magento Liver server uploaded site.
The problem is related to session or cookies. When I add product to cart or login, then visit category page, the session gets clear and i get signout and cart gets clear.
I tried setting session/cookie management. but not found solution.
Also asked to server technical support, they also not able to found.
This only happens in only one page category page.
Any other had faced this problem.
Please give me solution for this.
Thanks.

try this code for session issue fix
https://www.creare.co.uk/session-error-in-magento

Related

Magento Customer Login Issue - Login Page Keeps Reloading On Login

So I found several variations of this issue and tried the solutions; none worked.
So customers are not able to login with the correct username and password. The login screen (https://www.example.com/customer/account/login) just refreshes when the credentials are entered correctly -- should redirect to the My Account Dashboard.
The only thing that seems to temporarily work (few hours at a time before the problem comes back) is when we change back and forth the System > Config > Web > Session Cookie Management > Cookie Domain to "https://www.example.com" and ".example.com" Then we flush the Magento Cache and we flush the Storage Cache and refresh the all Cache Types.
After this, Customers can login on Firefox, Safari and IE, but not Chrome (same login page looping issue).
We have exhausted everything we can think of. No errors in the logs and we have the correct getBlockHtml('formkey'); ?> code in the login.phtml files. We are using a custom theme and noticed this problem after migrating the site from Enterprise Edition to Community edition.
Any suggestions would be greatly appreciated!
Thanks for reading this article and opportunity to post my answer here.
I also faced same problem which AShah faced. I also googleing but did not find such proper result. Finally I removed or clean the session folder (root>var>session) and its works fine for my store.
Hope this trick will solve you. thanks
First check what are the values set for following path in core_config_data
table
web/cookie/cookie_path
web/cookie/cookie_domain
Try by replacing any existing value by NULL.
Following should be set to 1
web/cookie/cookie_httponly

Magento : the cart is always empty

I've been looking for several days now and the problem is stil there.
I'm running the following version of Magento :1.9.0.1
I do not experience any particular problem on local (using Mamp). But on my production server my cart page (beginning of the checkout process) is always empty no matter the number of items i try to add inside my cart.
I tried lots of different solution posted on many websites but nothing seems to solve it (since this is working on local it might be a server configuration problem).
Any suggestion ?
Thank you
(Ps: English is not my main language so i'm sorry for the poor syntaxe).
Are you able to login to the site?
Just check in the backend. System->Configuration->Web->Session cookie management
Whether there is a wrong value set for cookie domain
I finally found the answer. The problem was related to a theme template module. I remove the module and it's working now.
Ty

Codeigniter Cart wrong cookie

I embedded this example http://net.tutsplus.com/tutorials/php/how-to-build-a-shopping-cart-using-codeigniter-and-jquery/ to my shop.
I faced an issue that $total = $this->cart->total_items(); gets quantity value.
And if compare cookies from my site with cookie from example this is the difference:
my ...total_items"*;i:66;*s:10:"cart_total";i:5610;}}.....
original ...total_items*";s:1*:"1";s:10:"cart_total";s:4:"1499";...
So as you can see cookie stores wrong. I tried logging variables in Cart library but for this moment haven't caught problem. And I have another issue, as I think related with cookie I cannot add more than 7 items in cart. But I investigated this issue a bit, and mentioned only for helping.

Cannot log in or add items to cart in Magento after migrating to new server

I have migrated a Magento site to another server (the same server the database was already hosted on) and I am no longer able to log in or add items to my cart. I have found a few others who have posted about this type of problem but nothing seems to work for me. I have disabled all caching, etc. Ensured that sessions work. Increased the session lifetime. No errors are being logged anywhere. If I enter wrong credentials I get an error. But if I enter the correct information it just keeps returning me to the login page. I have opened permissions completely. Nothing makes any difference! So aggravated. Please help!
Found the issue. Well sort of. I think there was a problem with the timezone (the server I moved to was an hour different from the other) but essentially I resolved the problem by increasing the values for two config items in core_config_data:
UPDATE core_config_data SET value=86400 WHERE path='web/cookie/cookie_lifetime';
UPDATE core_config_data SET value=86400 WHERE path='admin/security/session_cookie_lifetime';
The first query fixed the shopping cart problem, the second the admin login problem.
Again I think there is a mitigating factor here as well, but this at least got me over the hump.

Magento session lost when switching to https from http

I've searched high and low for a solution to this, with no luck. My host told me they are too busy to help.
Magento 1.4.2 // SSL cert
1- When I add an item to cart, the page reloads and my item is added to cart. [good]
2- Next, I click home, and my items are no longer visible in cart sidebar. [bad]
3- Next, I click "Tops", and my items are still not visible in cart sidebar. [bad]
4- Next , I click "Bottoms" and the items show just fine.
In all cases where the cart isn't visible, I can add https to the URL and the cart loads up just fine. Can anyone help me figure out why my session is being lost between http and https?
I have all my backend web cookie settings set to "no" except for sID.
Also- When a user is logged in, the cart items ALWAYS show on the right. It's only screwy if they're a guest.
Thanks guys, if you need me to post any code let me know.
wwwdotlylifdotcom
EDIT: Here is a screenshot of my cookies session in firebug (not exactly sure what I am looking at). Hope this helps.
And here is my Session settings in magento: I have tried just about every variation of turning these on and off.
EDIT!
This issue has actually been narrowed down to a cache issue. We found out that when the cache is dumped/deleted, the website works properly. But after a few minutes of surfing the problem happens again. Does anyone have any idea? (And should i change the question title?)
I'm using a module called Lightspeed from TinyBrick, and it seems the new cache options are messing with our site. =( I'm contacting them shortly.
**EDIT Tinybricks excellent support helped us out. Thanks for all of your suggestions.
Is the session cookie being set to be HTTPS-only? That'll prevent it from being carried over to regular HTTP requests, effectively giving the user two different sessions.
You have in your screenshot two frontend cookie with two domains, one with www and an other one without. Check if you have a correct domain name in the configuration > Web tab > Cookie Management > Cookie Domain (or something close to that). If it's empty set it to ".mydomain.com" and try again.
Check if you don't have different cookie domain in your configuration in the other store views, set them to "use website".
If still doesn't work, What are the values of the fields of cookie management and the cookie validation settings
We were experiencing similar issues where our custom nav (depending on whether a user was logged in or not, was not very consistent across different pages.
We followed the suggestion # http://ka.lpe.sh/2011/06/19/magento-checking-customer-admin-is-logged-in-or-not/ to check if a user was logged base on the frontend session variable before a rendering a particular block, and it seems to have done the trick.
Perhaps you can try something similar.
Tinybricks excellent support helped us out. Thanks for all of your suggestions. This was a localized problem based off cache and a module called Lightspeed.

Resources