phpMyAdmin “Cannot start session without errors” [Solved]

Sometimes phpMyAdmin shows the error message “Cannot start session without errors”. The problem can be due to file and folder permissions. We can easily solve this issue. Let’s see the solutions:

Sol 1: Set Full Permissions

It’s a very easy method to solve this error. This will set full read/write permissions on the PHP sessions folder.

sudo chmod 777 /var/lib/php/session

This command will solve this issue for most of the servers.

Sol 2: Set Permissions to Specefic User

To ensure the security, we can follow this method. If you want to provide permissions to a specific user, then just run this command:

sudo chown user:group /var/lib/php/session

To force refresh the phpMyAdmin page, you can run this command:

sudo chown -R user:group /var/lib/php/session

Please replace user:group with your user and group. Such as nginx:nginx, apache:apache, root:root, centos:centos etc.

Sol 3: Notes

  • The php/session folder may be in a different location on some servers. To get the session path, check your php.inifile.
  • If session directory not found in your server, you can try by creating the session folder. By typing this command sudo mkdir /var/lib/php/session you can create the dir. Then you can set permissions.

Thanks for reading. I hope this solution may help you. ?