Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [session]

Denotes questions about session management in Magento.

0
votes
0answers
20 views

How to get custom session in rest api calls?

I have created a custom session and it's storage with custom namespace. I have set some data in storage which I am trying to fetch in my api calls but not getting any data in session. I do get the ...
0
votes
0answers
9 views

Warning: session_regenerate_id(): Session object destruction failed. on Magento 2 Checkout

I have a Magento 2.2.4 running on a Windows IIS server. When entering checkout, I often get There has been an error processing your request error. When I check the error report, it says * ...
0
votes
0answers
14 views

Magento 2 - Call to a member function getId() on null, admin user ID

I have a custom module, and it's work perfectly in the past, and now I installed on a new Magento 2 project. and after that, I add the sample data module, and on setup:upgrade I get this error : ...
1
vote
0answers
25 views

Magento2.2 - - Failed to read session data

If you open the front end with multiple tabs in the browser, the following error is output:. Exception #0 (Exception): Warning: session_start(): Failed to read session data: user (path: /var/opt/remi/...
1
vote
0answers
30 views

Magento 1.9.4.0 order not creating

I have been working on integration of a payment gateway with Magento 1.9.4.0 it works perfectly and the orders are being created successfully. However, there is a case when the user tries to login ...
4
votes
2answers
139 views

Magento 2 products in cart from other session

Strange behavior in Magento 2.2.8! When I leave the page for a few minutes and then do a refresh, products from other user sessions are in my cart! 20 minutes refreshing and there are 17 products in ...
1
vote
0answers
25 views

Magento 2 Remove cart content when user log-out | Empty cart when logged back in

Correct me if I'm wrong, but completely removing the cart content on customer log-out is not native to Magento 2 is it? I read about the "Persistent cart" but it seems to work only for removing the ...
0
votes
1answer
44 views

Magento 2 Session getting reset after placing order

Can anyone help me with this? I want some information from the session after order is placed. I tried customer session and even my own new session but after placing order am bot getting anything in ...
1
vote
1answer
21 views

how can we access customer session in checkout

I have one special field called some_id in customer data and I want to save the some_id and quote_id in database. I am using sales_quote_save_afterevent to save both ids. But my customer session is ...
0
votes
1answer
48 views

Magento 2.2.2 - Warning: SessionHandler::read() No space left on device

My application is showing error: Magento 2.2.2 - Warning: SessionHandler::read() No space left on device (28) in /var/www/html/vendor/magento/framework/Session/SaveHandler/Native.php on line 22 I ...
2
votes
0answers
28 views

Magento 2 Increase guest session time and keep the items in cart for 20 days

I want t increase guest user session time in magento. If guest user add to cart and just go for lunch or any other activity putting his/her website open in browser, when user come after 5-6 hours ...
0
votes
0answers
79 views

Magento 2.3: get cart items inside the cron file

I want to get current quote data for cronjob in cron/run.php But my code it's not working. Magento2 version is CE 2.2.6. Here is my code <?php namespace ABC\Abandon\Cron; use \Psr\Log\...
2
votes
0answers
29 views

Set Lifetime Session but Around a Week Expired Session--AGAIN and AGAIN in Magento 2.2.4

i want to set lifetime session but after around 1 week session has expired session.gc_maxlifetime 31536000 and Adding admin/security/session lifetime to 31536000 in core_config_data but still ...
0
votes
0answers
25 views

Magento 2.2 - Session not working on Helper Class

public function add($productId, $data) { $this->_customerSession->setData('customData', $data); } private function hasData($productId, $side) { return $engraving = $this->...
0
votes
1answer
84 views

Can't access frontend Magento 2

I can't access the frontend of my website, and when I look at the error report it gives me the following message: Session data file is not created by your uid I can access the admin panel without ...
1
vote
1answer
83 views

Session error in magento2

I am getting an error like this in the site. How can I resolve it? I am using Memcache for session storage. My Magento version is 2.1.15 Warning: SessionHandler::read(): Unable to clear session ...
1
vote
1answer
21 views

Magento2.2.5 : How to maintain a session value in product detail page to custom controller page?

I implemented some custom options in the product pdp page. i.e, i have to engrave the product in frontend(eg.pendant FRONT SIDE) as well as the backend(eg.pendant BACK SIDE) without refreshing the ...
2
votes
0answers
122 views

Magento EE: session_start(): Unable to clear session lock record

Magento Enterprise Edition 1.14.0.1 PHP 7.2.15 PECL memcached extension 3.1.3 We encountered this problem upgrading Magento EE from PHP 5.6 to PHP 7.2. We do not see the problem using the memcached ...
0
votes
0answers
39 views

Magento 2: How to load another customer data on checkout instead of current logged in customer via custom module?

I want to show a customers list as dropdown on checkout page and when I change the customer from that dropdown list, All details like shipping addresses, customer detail should be change according to ...
2
votes
1answer
70 views

customer first name and last name separately (Magento 2)

I am trying to get First Name and Last Name from the session. But I am not able to get First name or last name. Instead, I am able to get the full name. $objectManager = \Magento\Framework\App\...
1
vote
1answer
58 views

503 error only when customer logs in (Magento 1.9.4.0)

Website works fine until a customer logs in and then they are presented with a 503 error when they browse to any category or product. The actual account page does appear fine once they are logged in. ...
1
vote
1answer
57 views

How to get custom session value in javascript set through Magento\Framework\Session\SessionManagerInterface?

Following program is used to set value of custom session variable country. <?php namespace Vendor\Module\Controller\Index; use Magento\Framework\App\Action\Context; use Magento\Framework\App\...
2
votes
1answer
32 views

Users on IE and Edge have to log in twice on Magento 2 store

I was tasked on fixing JS console errors and browser testing for a Magento site that someone else developed (I assume the original developers quit). I got this finished, but now I am encountering a ...
3
votes
0answers
699 views

Your session has expired magento 2.3 [closed]

when i want add to cart product it showing error Your session has expired how i solve this problem.
1
vote
0answers
27 views

How to pass SID to url?

I see here many questions how to remove SID. It seems this is not very rare. How that even happen? Even if php ini settings for session.use_trans_sid is true and Magento setting Use SID on Frontend ...
0
votes
0answers
206 views

Magento 2 Fatal error: Uncaught Error: Call to undefined method Magento\Framework\Session\SaveHandler\Native::write()

I've been getting this error when I tried to access my project: Fatal error: Uncaught Error: Call to undefined method Magento\Framework\Session\SaveHandler\Native::write() in C:\xampp\htdocs\...
1
vote
0answers
32 views

Customers receiving order confirmation with another customer's details

We recently upgrade out Magento 1.9.0.1 site to the latest patches through to SUPEE-10975. We have started seeing a number of problems like so; Some backend orders show customer email address and ...
3
votes
3answers
247 views

How to increase user Session time in magento 2.2.2?

I have tried to increase session time, cookies time from admin panel And php.ini file. But both ways are not working for me. Still, the session expires in 30 mins. I want to make it for a day.
0
votes
0answers
15 views

Magento 1 change session serialization from php to json

I'm a programmer new to Magento. I want to access the session objects (stored in redis) from other systems. Unfortunately the php serilization is not well documented so libraries in other languages ...
0
votes
1answer
65 views

Override core files in Magento 1.9.4 (Varien.php)

What would be the most appropriate structure of the module in order to rewrite function validate() at app/code/core/Mage/Core/Model/Session/Abstract/Varien.php The idea is to rewrite that block ...
0
votes
0answers
51 views

How to solve intermittent exceptions in the Zend Framework's SessionHandler?

this is my first question at this forum! Circumstances are M2 2.2.7 on CentOS 7 with PHP 7.1 + all 3 types of caches managed by Redis 3.2.12 (on instance per type of cache). MySQL 5.latest and a ...
0
votes
1answer
33 views

How to render login error message in product page?

If a user tries to login with wrong credentials then normally a message appears which says "login failed", it works if I do it on the normal login form at /customer/account/login/ But if I am at a ...
0
votes
0answers
17 views

Magento 2: What is the best practice of storing and retrieving custom data

Looking for some input on what the best practice would be to store and retrieve custom data. As an example, I need to store, retrieve and update a couple of custom variables: access_token and ...
0
votes
1answer
87 views

Magento 2.2.x: Persistent Checkout can't be disabled

The problem is even when i disable the "persistent checkout", it still work as normal. Its a magento default module, so i think this is a magento 2 bug. After a day working on this, i still don't ...
1
vote
1answer
131 views

How to fix session error in magento 2.3.0

How to fix error "Your session has expired"
1
vote
1answer
16 views

Customer Session Delay

I have a .phtml file that loops through dropdowns. There are 6 dropdowns belonging to two different groups (so 3 dropdowns per group). I set a session on button click: if ($this->getRequest()->...
0
votes
0answers
32 views

Login session does not work

I am trying to use login session on magento/catalog/view/base/templates/product/price/amount/default.phtml to hide price from users not logged in. However, it seems not working well with $...
0
votes
1answer
38 views

Magento2- Session Empty After Being Set

I have some code that, when a button is clicked, sets a session value to 1. Then (in the same frontend place) checks that value and if present, do something else. This is my Controller (skimmed to ...
0
votes
0answers
17 views

ASV scan failing because of Session ID in URL

We're on a Magento 1.9.3.7 and our Aperia ASV scan is failing because of Session ID in URL. One example would be the following https://mystore.com/category.html?SID=rmdfi0m0gibepot9eom7egj384 Payload:...
1
vote
0answers
34 views

Why reset the customer session data when FPC is enabled?

Regarding this article from @SohelRana what is the business or technical decision to empty the customer session data when FPC is enable?
0
votes
0answers
39 views

In Magento 1.9, how to access session id on the client side using javascript?

According to the following 2 answer, PHP session id is stored on the client side and with each request, the session id is sent to the server which is what helps the server in identifying the client. ...
0
votes
0answers
26 views

Magento throws a report error when customer session expires and shopping cart persistent is active

So recently I experienced a different issue in Magento 2.2.5, related to the shopping cart persistent. Basically what happens is when a customer is logged in with a product in the cart, and this ...
0
votes
1answer
76 views

How to solve session_generate_id exception in magento2?

Getting error 1 exception(s): Exception #0 (Exception): Warning: session_regenerate_id(): Session object destruction failed. ID: user (path: D:\Projects\xampp\tmp) in \vendor\magento\framework\...
1
vote
1answer
193 views

How to use session data in view (phtml) magento 2

i can access session data in my controller using \Magento\Framework\Session\SessionManagerInterface public function __construct( Context $context, PageFactory $resultPageFactory, ...
0
votes
2answers
219 views

Problem Sessions Database - Magento 2

today I saw my Magento database and in a few months it went from a weight of 300MB to 2GB. I saw which of the tables was heavier and I saw that there is a 2GB SESSION table. Why do the sessions are ...
0
votes
0answers
440 views

Magento 2 Session issue

I have moved my Magento code base to another folder and I have upgraded the php version to php7. Now I am facing the following error. SessionHandler::read(): Session data file is not created by ...
0
votes
0answers
50 views

Does Magento 2 ever clean up it's own old sessions?

We currently have a production site with 4.2 GB of session data, dispersed over 2.8 million records. Some of these sessions are more than 1,5 year old! I was always in the assumption that Magento ...
1
vote
1answer
476 views

Magento 1 session in database error with PHP 7.2

Updated to Magento 1.9.3.10 with PHP 7.2. If I save the sessions in db: <session_save><![CDATA[db]]></session_save> I get this error: Recoverable Error: session_module_name(): ...
0
votes
0answers
138 views

Redis session configuration breaks web setup page

I have an issue when it comes to using Redis as session cache. If I use Redis for session caching, I lose the ability to go /setup page. When I remove Redis related code, the page loads just fine. I'...
0
votes
1answer
15 views

Acquire session of logged in customer in external script

I was trying to acquire session of logged in customer in one of external PHP script in the same folder as my Magento installation: <?php require_once 'app/Mage.php'; umask(0); Mage::app(); $...