调用session_start()时如何解决权限错误? [英] How can I fix the Permission error when I call session_start()?
问题描述
当我将脚本上传到服务器时,出现此错误
when I uploaded the script to the server I got this error
警告:未知: 打开(/tmp/sess_58f54ee6a828f04116c2ed97664497b2, O_RDWR)失败:权限被拒绝(13) 在第0行上的未知"中
Warning: Unknown: open(/tmp/sess_58f54ee6a828f04116c2ed97664497b2, O_RDWR) failed: Permission denied (13) in Unknown on line 0
警告:未知:编写失败 会话数据(文件).请确认 的当前设置 session.save_path在(/tmp)中是正确的 在第0行上未知
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
我致电session_start();
时出现错误
尽管我将/tmp文件夹的权限设置为777.
the error appeared when I call session_start();
although I set the permission of /tmp folder to 777 .
推荐答案
更改会话路径,您可以在其中写入数据或就/tmp问题与服务器管理员联系
Change session path where you can write data or contact server administrator about /tmp problem
http://php.net/manual/en/function. session-save-path.php
这篇关于调用session_start()时如何解决权限错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!