有效的open_basedir限制。文件(/)不在允许的路径中: [英] open_basedir restriction in effect. File(/) is not within the allowed path(s):

查看:1489
本文介绍了有效的open_basedir限制。文件(/)不在允许的路径中:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网站上上传了一个虚拟形象上传的错误。我从来没有得到它,最近没有什么改变,我开始得到这个错误...

$ p $ 警告:is_writable( )[function.is-writable]:
有效的open_basedir限制。
文件(/)不在允许的路径中:


解决方案

修改 open_basedir 设置(参见 运行时配置 )。
$ b

open_basedir 用于防止特定用户的PHP脚本访问另一用户帐户中的文件。通常情况下,您自己帐户中的任何文件都应该可以被自己的脚本读取。



通过 .htaccess 如果PHP在Linux系统上作为Apache模块运行:

 < DirectoryMatch/ home / sites / site81 /> 
php_admin_value open_basedir/ home / sites / site81 /:/ tmp /:/
< / DirectoryMatch>


I'm getting this error on an avatar upload on my site. I've never gotten it before and nothing was changed recently for me to begin getting this error...

Warning: is_writable() [function.is-writable]: 
open_basedir restriction in effect. 
File(/) is not within the allowed path(s):

解决方案

Modify the open_basedir settings in your PHP configuration (See Runtime Configuration).

The open_basedir setting is primarily used to prevent PHP scripts for a particular user from accessing files in another user's account. So usually, any files in your own account should be readable by your own scripts.

Example settings via .htaccess if PHP runs as Apache module on a Linux system:

<DirectoryMatch "/home/sites/site81/">
    php_admin_value open_basedir "/home/sites/site81/:/tmp/:/"
</DirectoryMatch>

这篇关于有效的open_basedir限制。文件(/)不在允许的路径中:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆