简体   繁体   English

XAMPP - phpMyAdmin 错误 session_start() 权限被拒绝 (13)

[英]XAMPP - phpMyAdmin error session_start() Permission denied (13)

I recently upgraded my Macbook's OS to El Capitan.我最近将 Macbook 的操作系统升级到 El Capitan。 I set up XAMPP just like i did on my old OS.我像在旧操作系统上一样设置了 XAMPP。 I am trying to create a Database using phpMyAdmin But all i am getting is this error:我正在尝试使用 phpMyAdmin 创建一个数据库但我得到的只是这个错误:

Warning in ./libraries/session.inc.php#101 ./libraries/session.inc.php#101 中的警告

session_start(): open(/var/folders/w3/w7pdy78x5r57wmgcytwvh16r0000gn/T/sess_t4t8i795i8d67a52b785rr0j86isrn8c, O_RDWR) failed: Permission denied (13) session_start(): open(/var/folders/w3/w7pdy78x5r57wmgcytwvh16r0000gn/T/sess_t4t8i795i8d67a52b785rr0j86isrn8c, O_RDWR) 失败: 权限被拒绝 (13)

Backtrace回溯

./libraries/session.inc.php#101: session_start() ./libraries/common.inc.php#350: require(./libraries/session.inc.php) ./server_databases.php#12: require_once(./libraries/common.inc.php) ./libraries/session.inc.php#101: session_start() ./libraries/common.inc.php#350: require(./libraries/session.inc.php) ./server_databases.php#12: require_once(. /libraries/common.inc.php)

I thought it was a permissions issue so i changed all the XAMPP folders to read and write for all but still getting the same error.我认为这是一个权限问题,所以我将所有 XAMPP 文件夹更改为对所有人进行读写,但仍然遇到相同的错误。 I have never been faced with this error before and my phpMyAdmin worked fine on my old OS.我以前从未遇到过这个错误,我的 phpMyAdmin 在我的旧操作系统上运行良好。 I have seen similar questions posted on here but none of the answers for them are working for me.我在这里看到过类似的问题,但没有一个答案对我有用。 Dose anyone know what it could be?有谁知道它可能是什么? Is this a problem within XAMPP/Apache or is this coming from the browser maybe?这是 XAMPP/Apache 中的问题还是可能来自浏览器? Im so lost with it and all out of ideas!我对它很迷茫,完全没有想法!

UPDATE更新

I don't know if this helps but i just checked my PHP info settings for session.save_path and it says "NO VALUE" is that suppose to be like that?我不知道这是否有帮助,但我只是检查了 session.save_path 的 PHP 信息设置,它说“无值”是这样吗?

After spending all night trying to figure out the problem i finally found the solution.在花了一整夜试图找出问题之后,我终于找到了解决方案。 I copied the location of the TMPDIR.我复制了 TMPDIR 的位置。

Then used this in the Terminal:然后在终端中使用它:

sudo chmod 777 /paste/TMPDIR/location/here/...须藤 chmod 777 /paste/TMPDIR/location/here/...

And then restart XAMPP and should be all good from there.然后重新启动 XAMPP,从那里应该一切都很好。 I hope this helps :)我希望这会有所帮助:)

I had this problem even with correct folder permissions.即使具有正确的文件夹权限,我也遇到了这个问题。 I solved it deleting the session files that were in the folder我解决了删除文件夹中的会话文件的问题

  1. go to your phpinfo() then find your "session.save_path" value转到您的 phpinfo() 然后找到您的“session.save_path”值
  2. use your terminal locate to that path then try type "ls" to list file使用您的终端定位到该路径,然后尝试键入“ls”以列出文件
  3. delete all file named start with sess_* (in my case I deleted "rm sess_c4ac83103bb5d8a77352a7cc4c9036eb") and then try refresh phpmyadmin again.删除所有以 sess_* 开头的文件(在我的例子中,我删除了“rm sess_c4ac83103bb5d8a77352a7cc4c9036eb”),然后再次尝试刷新 phpmyadmin。 it's works for me., hope it helps.它对我有用。,希望它有所帮助。

I had same issue in my MAC OX and XAMPP.我的 MAC OX 和 XAMPP 也有同样的问题。

To solve issue try to remove session files from location reported in error message.要解决问题,请尝试从错误消息中报告的位置删除会话文件。 MAC users: /Application/XAMPP/xampfiles/temp/ (whatever the session id is - it will be in error message and you will find file with the same name) Additionally open terminal in the location of /temp folder and change access: MAC 用户: /Application/XAMPP/xampfiles/temp/ (无论会话 ID 是什么 - 它将出现在错误消息中,您将找到同名文件)另外在 /temp 文件夹的位置打开终端并更改访问权限:

 chmod -R o+w 
  • In case you added vhost it might be in conflict with settings (user daemon, group daemon in htdocs.conf in case you changed user as an vhost change in your XAMPP recommended for MAC users to avoid 403 access denied issue for MAC OX users using XAMPP).如果您添加了 vhost,它可能与设置冲突(用户守护程序,htdocs.conf 中的组守护程序,以防您将用户更改为 XAMPP 中的 vhost 更改,推荐给 MAC 用户以避免使用 XAMPP 的 MAC OX 用户的 403 访问被拒绝问题)。
  • in case you have relocated folders in XAMPP/htdocs/ your session will contain same id but will have wrong location and needs to be removed manually as location of your project was while session was active.如果您在 XAMPP/htdocs/ 中重新定位了文件夹,您的会话将包含相同的 ID,但位置错误,需要手动删除,因为您的项目位置在会话处于活动状态时。 Go in folder reported in error message and delete session files.进入错误消息中报告的文件夹并删除会话文件。

This worked for me, hopefully will save you some time.这对我有用,希望可以为您节省一些时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM