open_basedir 错误阻止头像上传

发布于 2024-08-14 01:18:19 字数 647 浏览 3 评论 0原文

当我的网站上传头像时,我收到此错误。我已将服务器上的 php.ini 中的“open_basedir = /home/”更改为“open_basedir =”。这是一个专用服务器,我在调整后重新启动了它。

Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/source:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/source/public_html/lib/php/tru/directory.php on line 46



Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/source:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/source/public_html/lib/php/tru/directory.php on line 46

我还能做什么来解决这个问题?

I'm getting this error when avatars are being uploaded on my site. I've changed "open_basedir = /home/" to "open_basedir =" in my php.ini on my server. It's a dedicated server and I rebooted it after making the adjustment.

Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/source:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/source/public_html/lib/php/tru/directory.php on line 46



Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/source:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/source/public_html/lib/php/tru/directory.php on line 46

What else can I do to fix this issue?

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

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

发布评论

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

评论(1

安静 2024-08-21 01:18:19

问题不在于 open_basedir,而在于您的图片上传。仔细查看错误消息:

File(/) is not within the allowed path(s):

我敢打赌文件名/路径应该是一个空变量。

The problem is not with open_basedir, it is in your image upload. Look closely at the error message:

File(/) is not within the allowed path(s):

I bet there is an empty variable where the file name/path should be.

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