用户
 找回密码
 入住 CI 中国社区
搜索
查看: 4446|回复: 4
收起左侧

require(): open_basedir restriction in effect. File()这怎么解决?

[复制链接]
发表于 2013-11-25 08:56:31 | 显示全部楼层 |阅读模式
在阿里云那搞了个最低的服务器,他们帮我安装好环境后,我上传CI上去,访问CI目录就出样的错误了。求解!

A PHP Error was encounteredSeverity: Warning
Message:  include(): open_basedir restriction in effect. File() is not within the allowed path(s): (/usr/local/apache/htdocs:/tmp:/proc)
Filename: core/Router.php
Line Number: 138


A PHP Error was encounteredSeverity: Warning
Message:  include(): open_basedir restriction in effect. File() is not within the allowed path(s): (/usr/local/apache/htdocs:/tmp:/proc)
Filename: core/Output.php
Line Number: 103

A PHP Error was encounteredSeverity: Warning
Message:  require(): open_basedir restriction in effect. File() is not within the allowed path(s): (/usr/local/apache/htdocs:/tmp:/proc)
Filename: core/Common.php
Line Number: 145



发表于 2013-11-25 10:00:23 | 显示全部楼层
(/usr/local/apache/htdocs:/tmp:/proc)这个路径里面不包含你网站本身的路径,网网站的执行路径添加进去。如果是apache,一般是在站点的配置文件里面。
 楼主| 发表于 2013-11-25 10:16:23 | 显示全部楼层
perfectboook 发表于 2013-11-25 10:00
(/usr/local/apache/htdocs:/tmp:/proc)这个路径里面不包含你网站本身的路径,网网站的执行路径添加进去。 ...

APACHE配置内好像就写的/usr/local/apache/htdocs   而且我的CI就在这个目录的子目录下啊,怎么配置呢?

发表于 2013-11-25 13:32:31 | 显示全部楼层
那只能等高手了,我只知道这一个原因会引起这个,要不你看下,/usr/local/apache/htdocs和你的网站目录的用户和权限是不是相同的。
发表于 2013-11-25 16:53:46 | 显示全部楼层
/usr/local/apache/htdocs 这个目录给个权限试试,先试试777 解决了的话在缩小权限。

本版积分规则