cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3 - Unexpected error Exception: Warning: SessionHandler::read()

Magento 2.3 - Unexpected error Exception: Warning: SessionHandler::read()

I am getting Unexpected error,

 

Exception: Warning: SessionHandler::read(): open(/var/opt/remi/php72/lib/php/session/sess_5292j25aa4ugpdgrv9r6a3l3p8, O_RDWR) failed: Permission denied (13) in /usr/share/nginx/html/gta/vendor/magento/framework/Session/SaveHandler/Native.php on line 22 in /usr/share/nginx/html/gta/vendor/magento/framework/App/ErrorHandler.php:61

 

How to solve the error?

Platform : Centos 7, Nginx

2 REPLIES 2

Re: Magento 2.3 - Unexpected error Exception: Warning: SessionHandler::read()

Hi @Aveeva ,

 

Can you please check below link regarding your error.

https://support.magento.com/hc/en-us/articles/360033427272

 

Thanks!

If my answer is useful, please Accept as Solution & give Kudos

Re: Magento 2.3 - Unexpected error Exception: Warning: SessionHandler::read()

Hello Aveeva,

 

The Exception SessionHandler error might disrupt the last step of the Magento 2 installation. The session.save_handler PHP parameter set to other session storages than files causes the issue. For instance, it can be set to redis or memcached.

 

Since the older code versions cause the problem, you can try to upgrade it. However, to fix the issue, you need to try the steps below,

 

In order to upgrade the current code, follow the steps below,

  • Firstly, log in as a user with root privileges.
  • Now, open the php.ini file in a text editor.
  • Firstly, locate the session.save_handler file and execute the below command,
;session.save_path = <path>
  • Then, set it to a file system path as follows:
session.save_handler = files

If the error persists, you can follow the below solution:

 

  • You need to replace the following code in the env.php file at app/etc,

From:

'session' =>
  array (
    'save' => 'files'
  ),

To:

'session' =>
  array (
    'save' => 'db'
  ),
  • You can also try to set the session directory permission as a solution to fix the issue.

 

Thus, I hope the above solutions help you to fix the "Magento 2.3 - Unexpected Exception: Warning: SessionHandler::read()" error. 

 

-----------------------------

Regards,

Rex M

 

VPS Hosting | Magento Hosting