红联Linux门户
Linux帮助

nginx下安装配置phpadmin报错

发布时间:2017-02-13 10:08:22来源:linux网站作者:dahuzix
系统版本:centos7.0 64位
NGINX版本:nginx version: nginx/1.9.8
PHP版本:PHP 7.0.0 (cli)
MySQL版本:mysqld  Ver 5.7.10
phpmyadmin版本:4.5.2-all-languages
 
部署完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.
 
搜索以后,修改php.ini,开启:
session.save_path = "/var/lib/php/session"
 
确定/var/lib/php/session的权限:
[root@iZ28083jjgjZ /]# ll -d /var/lib/php/session/
drwxrwx--- 2 root apache 4096 Dec 2 00:57 /var/lib/php/session/
 
将用户修改为nginx:
[root@iZ28083jjgjZ /]# chown root.nginx /var/lib/php/session
 
重启nginx以后刷新页面,访问恢复。
 
本文永久更新地址:http://www.linuxdiyf.com/linux/28368.html