cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot regenerate session

Cannot regenerate session

1 exception(s):
Exception #0 (Exception): Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in /var/www/magento/magento/vendor/magento/framework/Session/SessionManager.php on line 531

 I installed Magento 2.4 via Composer and now see the front page and links on the page. However, when I go to login to admin URL, after logging in, I'm presented with the above error and no page.

 

I'm using Redis 6 and PHP 7.4 and have flushed, restarted redis, cleared cache but cannot resolve this. Does anyone have any suggestions?

4 REPLIES 4

Re: Cannot regenerate session

Hi @tommygunner 

 

use

ob_start()

at the start of the file.

 

It may help you !

Problem Solved? Please click on 'Kudos' & Accept as Solutin!

Problem solved? Click Accept as Solution!

Re: Cannot regenerate session

Hello @tommygunner 

 

Please refer https://magento.stackexchange.com/questions/95225/session-regenerate-id-in-magento-2-with-php-7

 

Thank you.

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: Cannot regenerate session

Unfortunately, adding ob_start(); at the top of the file below <?php  does not work and results in more errors. 

Re: Cannot regenerate session

I managed to get it working now with both Redis 5 and Redis 6. I tested both briefly and can access the admin area. I think the issue was php74-php-pecl-redis5 5.3.1- was not installed. After installing this it is working now. I'm using this php RPM for Redis 5 with Redis 6 but it still works. Perhaps something should be added to the instructions that php-redis is a requirement for Redis installation?