gpt4 book ai didi

php - 警告 : session_start(): failed: Permission denied (13)

转载 作者:行者123 更新时间:2023-12-04 02:04:32 27 4
gpt4 key购买 nike

我收到错误:

Warning: Unknown: open(/tmp/sess_beaac196b5082a77131f957bcfa35ee7, O_RDWR) failed: Permission denied (13) in Unknown on line 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

我检查了/tmp 目录,它是可写的(使用这段代码):

$filename = '/tmp';
if (is_writable($filename)) {
echo 'The file is writable';
} else {
echo 'The file is not writable';
}

php.ini 文件说 session.save_path 是/tmp

我是否遗漏了一些明显的东西?

编辑:我已经尝试设置一个新的 session 路径,但即使在 CHMOD 777 之后它也会告诉我:

Warning: session_start(): open(/sessions/sess_beaac196b5082a77131f957bcfa35ee7, O_RDWR) failed: No such file or directory (2) 

最佳答案

在页面开始处使用session_save_path()

引用:http://php.net/manual/en/function.session-save-path.php

关于php - 警告 : session_start(): failed: Permission denied (13),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27039635/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com