Why session is not able to set after upgrading PHP?

Recently I updated PHP version from 7.1 to 7.4 on CentOs having Nginx installed and session is no more able to set. After some RND, I came to know that I need to enable session from php.ini on server. Following are steps to enable session in CentOS.

Open php.ini using command

sudo nano /etc/php.ini

Search for

session.save_path=”/tmp”, remove semicolon infront of it.

Make sure “tmp” directory has sufficient permission to write.

In my case, I had to give proper group permission to “tmp” folder as per nginx installed on server.