Sometimes phpMyAdmin is inaccessible and gives the error message "Cannot start session without errors". This can be due to either a client-sided issue with cookies, or a server-sided issue relating to permissions of the temporary directory where session files are stored.
The error message
This is what the error message looks like:
phpMyAdmin – Error
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.
Client sided solution
This error can simply be an issue with cookies in your web browser, so either delete all stored cookies or selectively delete them for just the domain/directory where phpMyAdmin is if your browser allows this.
For example, in the current version of Google Chrome at the time of writing this post, you can go into the preferences then select Under the Hood -> Content Settings -> All Cookies and Site Data and then type the domain into the "Search cookies" input box. Then hover over the domain in question and click the X delete button. (Alternatively you could do this via the developer tools).
Server sided solution
If the above didn’t work then it may be an issue with directory permissions or directory ownership of the directory where PHP keeps its session files.
I’ve experience this particular server-sided issue on CentOS 5.x when we ran Apache under a different user/group and each time we did a PHP update the permissions were reset.
Locate the directory where sessions are stored in the php.ini file. It will look something like this, although the exact path will vary depending on the distro and any customizations you may have made yourself:
session.save_path = "/var/lib/php/session"
Now check the permissions of that directory and make sure that the web server has permissions to access it.
You may need to either change ownership of the directory, e.g.:
sudo chown user:group /var/lib/php/session
and substitute "user" for the actual username and "group" for the actual group, and /var/lib/php/session for the actual session save path.
Alternatively, just change the permissions of the directory so it’s world readable and writeable:
sudo chmod 0777 /var/lib/php/session
Page version history
This page was originally posted on October 22nd 2008 to just deal with the server-sided issue as described above. As seen in the comments below, other people were getting the error to do with cookies and I had the same error today which prompted me to rewrite this post.
There were also some minor errors in the original post and it was far too wordy and specific to my own issue, so a full rewrite was in order.