• 欢迎访问显哥博客,本网站纯属学习技术,绝无商业用途,欢迎小伙伴们共同学习!研究技术!QQ:52249909 加我QQ
  • 世界75亿人,这么小的概率,能认识你,是我一生的幸运,不妨加个QQ接触一下:52249909 加我QQ

搭建phpmyadmin时报错Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.

技术栈 lixian 4年前 (2020-03-06) 1429次浏览 2个评论 扫描二维码
文章目录[隐藏]

报错原因

我在搭建phpmyadmin的时候,报了这样的一个错误:
搭建phpmyadmin时报错Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.

Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.
session_start(): open(SESSION_FILE, O_RDWR) failed: Permission denied.

当时我以为是session被占用的问题,于是我问度娘,好多文章写的杂杂乱乱,最后整理一下,原来是session.save_path位置的问题。

解决方法

首先我们先看下/var/lib/php/session这个目录是否存在,如果不存在手动创建出来。

mkdir /var/lib/php/session
chown  www:www /var/lib/php/session
chmod 777 /var/lib/php/session

保存重启nginx和php-fpm。
然后返回浏览器即可看到可以访问啦。


喜欢 (1)

您必须 登录 才能发表评论!

(2)个小伙伴在吐槽
  1. I am a student of BAK College. The recent paper competition gave me a lot of headaches, and I checked a lot of information. Finally, after reading your article, it suddenly dawned on me that I can still have such an idea. grateful. But I still have some questions, hope you can help me.
  2. I don't think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.