警告:session_start()失败:没有这样的文件或目录

发布于 2024-09-09 09:13:14 字数 515 浏览 0 评论 0原文

我正在尝试安装 berta (v 0.6.3b),但收到此错误:

警告:session_start() [function.session-start]: 打开(/var/php_sessions/sess_a0d6b8422181739d10066fb60cebfe5d,O_RDWR) 失败:没有这样的文件或目录 (2) /hermes/bosweb/web010/b100/ipg.ellieniemeyercom/engine/_classes/class.bertasecurity.php

第 75 行 该错误似乎发生在 class.bertasecurity.php 的第 75 行(查看源代码)

有什么问题以及如何修复它?

I'm trying to install berta (v 0.6.3b) and I get this error:

Warning: session_start() [function.session-start]:
open(/var/php_sessions/sess_a0d6b8422181739d10066fb60cebfe5d, O_RDWR)
failed: No such file or directory (2) in
/hermes/bosweb/web010/b100/ipg.ellieniemeyercom/engine/_classes/class.bertasecurity.php

on line 75 The error seems to happen on line 75 of class.bertasecurity.php (view source code)

What is wrong and how can I fix it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

梦在深巷 2024-09-16 09:13:14

确保会话目录可写,或者您可以自己设置路径:

session_save_path

如果您正在使用上述功能,此注释也很有用。

Make sure that session directory is writable or you can set a path yourself with:

session_save_path

This comment is also useful if you are using above function.

迷鸟归林 2024-09-16 09:13:14

我认为 PHP 进程无法访问包含会话数据的文件夹。

如果您还没有触及 php.ini,则默认 session.save_handler 应该是文件(这意味着会话数据将存储在文件系统上的文件夹中)。 session.save_path< 的值/code>包含该文件夹,您应该检查它是否存在以及它对您的 php 进程的权限。

I think the folder containing the session data cannot be accessed by the PHP process.

If you have not touched your php.ini, the default session.save_handler should be files (which means that session data will be stored in a folder on your file system). The value of session.save_path contains that folder, you should check that it exists and its permissions for your php process.

猫腻 2024-09-16 09:13:14

如果您要更改会话所使用的路径。

您还可以考虑通过更改 php.ini 文件中的 session.save_path 变量来解决此问题。

然后,您将在配置文件中进行修复,而不仅仅是在脚本中进行修复。

If you're changing the path that is being used for sessions.

You also might consider, fixing this problem by changing session.save_path variable in your php.ini file.

Then you'll be fixing in your configuration file and not only in your script.

野味少女 2024-09-16 09:13:14

会话保存在服务器的硬盘上。您的会话保存路径很可能不存在。尝试将其设置为确实存在或您具有读/写权限的目录。

Sessions are saved on the harddisk of your server. Most likely your session save path does not exist. Try setting it to a directory that does exist or that you have read/write rights to.

自由范儿 2024-09-16 09:13:14

我们在将网站从 cPanel 服务器迁移到其他主机时遇到了此问题。

session.save_path 是在 public_html/ 文件夹内的 php.ini.user.ini 中配置的,并且可能会覆盖主机想要使用的默认路径。

我们认为根本不需要这些文件,只是旧服务器的遗留问题,然后删除/重命名它们,这解决了问题。

We encountered this problem when migrating a website from a cPanel server to a different host.

The session.save_path was configured in php.ini and .user.ini inside our public_html/ folder, and was presumably overwriting a default path the host would have wanted to use.

We decided the files were not needed at all, just a hangover from the old server, and deleted/renamed them out of the way, and this fixed the problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文