5

When I try to login to PHPmyadmin, I get the following error:

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. Also ensure that cookies are enabled in your browser.

I tried to fix by changing permissions of the /tmp (listed as sessions path in php.ini) to 755, then tried 777.

I also tried changing user and group ownership with chown to www-data. (www-data listed as user for php-fpm and Nginx).

Tried multiple web browsers, deleting cookies, deleting all session files from server's /tmp folder.

PHP info shows sessions loaded. Not sure what else it could be, all other areas of the site load perfect and there's nothing in error logs related.

Is this something you are familiar with?

Hayden
  • 151
  • 1
  • 1
  • 4
  • http://stackoverflow.com/questions/5013118/cannot-start-session-without-errors-in-phpmyadmin – nuthan Jul 16 '14 at 07:18

5 Answers5

2

PHP "sessions" store variables so they can persist across multiple HTTP requests.

PHP sends your browser a single cookie that serves as a key. The key is used to retrieve the values from server-side storage.

By default, PHP uses files to store session data on the webserver (which in your case is actually your local PC). Your error indicates that your webserver can't retrieve the file, so it can't restore the variables, and phpMyAdmin can't proceed.

This is likely due to filesystem permissions issues on your local PC.

Do following things

Try to open phpmyadmin in another browser. If it opens then it means it is related with your browser cache memory so try to delete cache and temp files of your browser then restart your wampsever.

Second thing, If the first one fails, try to delete session files of phpmyadmin which is located in C:/wamp/tmp. Do not delete the temp folder but the content inside the temp folder.

Restart your wampsever and it will work.

  • Good hint for caching. Bad call on the OS (if the user chmods permissions then it is probably not on windows) – Hennes Jun 28 '16 at 14:29
1

I had the same issue and resolved it with the following command:

sudo chmod 777 /var/lib/php/session/
Gaff
  • 18,569
  • 15
  • 57
  • 68
Qaisar Ali
  • 29
  • 1
  • Welcome to Super User! On this Q&A site we try to provide [good answers](https://superuser.com/help/how-to-answer) to questions people post. Part of providing a good answer is providing some context for your answer. Please edit your answer and explain *why* it is the correct solution to this problem. – Cas Oct 17 '16 at 12:00
1

Also check your session.save_handler value in your php.ini. I got this error when I changed it to memcached, and worked again when changing back to files.

0

In my ubuntu, I resolved by @Qaisar Ali's answer. But the path is different.

sudo chmod 777 /var/lib/php/sessions/
sabeerzabi
  • 101
  • 1
0

Anyone who faces this issue in WAMP server, the value of "session.save_path" in php.ini could be wrong.

  • You might give some additional information here, like default values for the variable or what event might have changed that entry. – r2d3 Jan 23 '21 at 14:03