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.

1
vote
1answer
18 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
49 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
1answer
24 views

PhpCookieManager [closed]

What's a good average to have? It looks like my website is set to 50. I have 4 stores and lately I've been throwing some weird system. Log errors which I'm not 100% sure, if they pertain to this same ...
0
votes
0answers
26 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
37 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
44 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
42 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
22 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 ...
2
votes
0answers
212 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
21 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
53 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
25 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
97 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
11 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
37 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
30 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
26 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
14 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
55 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
62 views

How to fix session error in magento 2.3.0

How to fix error "Your session has expired"
1
vote
1answer
15 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
17 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
26 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
16 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
30 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
30 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
24 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
0answers
42 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
60 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
82 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
231 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
35 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
356 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
99 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
12 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(); $...
0
votes
1answer
126 views

Magento 2: Multi website session issue

I am a beginner to magento and I have created a magento 2 multi-website and the URL looks like http://127.0.0.1/testproject/ and http://127.0.0.1/testproject/test. On these websites, while I have ...
1
vote
2answers
75 views

Magento 1.9.3.2 - Exception printing is disabled by default for security reasons

I have just moved a Magento install from one server to another and now when I try to access the frontend I get the "Exception printing is disabled by default for security reasons" error. I have ...
0
votes
1answer
13 views

Detect “was previous page from the same magento website?” If yes: then dont show APP notice

We have an APP popup that popups in mobiles. It depends on a meta param in the header. We would like to create an if / else scheme like if new visitor: print the meta param else (if not new and ...
0
votes
1answer
77 views

How to fix "Direct use of $_SERVER Superglobal detected' in Magento 1

Using the $_SERVER super global in an extension causes the following guideline error Direct use of $_SERVER Superglobal detected I know the alternative for Magento 2 but how do you solve this for ...
0
votes
2answers
286 views

Magento 2 checkout session

Is there any way to store checkout custom field data to checkout session? If possible how can I retrieve data? Created an event <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/...
2
votes
1answer
165 views

Get Error SessionHandler::read() When installing Magento 2 with Nginx

I downloaded magento 2.2.5 and try installing with nginx server, but I got blank page in the installation and then I saw the this error in the report file : {"0":"Warning: SessionHandler::read(): ...
0
votes
2answers
159 views

Magento 2.1.10: How to override Magento\Framework\Session\SessionManager

I'm looking for solution for override. Magento\Framework\Session\SessionManager I use the usually way (preference in di.xml), but no hope. di.xml <?xml ...
3
votes
3answers
42 views

Magento 2 - Check if user is loggen in header.html [duplicate]

I'm trying to create a piece of code to check if the customer is loggen in or not. I read not to use the objectmanager for that, but I don't know where to put which code. What I need: if customer is ...
0
votes
1answer
66 views

Session not getting value from phtml to block class magento 2

Value get back from session. did'nt get values please someone review my code. need help Here's my code: /home1/dukaania/public_html/testing2/app/code/Sugarcode/Test/Model/Total/Fee.php <?php /** ...
0
votes
1answer
38 views

getvalue() error field not get values

Fields not getting values in return array. $0.00 Please, someone, review my code. public function fetch(\Magento\Quote\Model\Quote $quote, \Magento\Quote\Model\Quote\Address\Total $...
1
vote
3answers
236 views

How can I set a global variable in Magento 2?

The scenario is I want to set my variable to a global variable from a phtml file and call in a module file or block file. So what would be some code or tutorial link that I set my variable to global ...
1
vote
2answers
63 views

How to destroy specific backend session programmatically

I am doing login and logout to magento backend via API. I am enable to create the session and pass to API response to my UI part. But when I log out from UI , the API should destroy that backend ...
0
votes
0answers
9 views

Does magento end a session when user password is reset?

Does magento end a session when user password is reset? If person A is logged in to magento and person B is logged in with the same account (at the same time), and then person A changes the password,...
2
votes
1answer
37 views

502 when customer signed in but not in customer account section

Using Redis and Cm_RedisSession module to store sessions, I'm seeing a 502 Bad Gateway error when a customer is signed in (but not when they are in the customer account section). The php error was ...
0
votes
1answer
341 views

How to set session variable

I need to set a variable session in Magento, do I do just procedural PHP or is there a proper way in Magento 2 ? Example : $_SESSION['myKey'] = "00001"; @AnsarHunsain code help me, but I can't get ...