open_basedir 错误阻止头像上传
当我的网站上传头像时,我收到此错误。我已将服务器上的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题不在于 open_basedir,而在于您的图片上传。仔细查看错误消息:
我敢打赌文件名/路径应该是一个空变量。
The problem is not with open_basedir, it is in your image upload. Look closely at the error message:
I bet there is an empty variable where the file name/path should be.