对联 ·故事 ·史海钩沉 ·人物档案 ·地方风俗 ·谚语大全 ·讽刺与幽默 · 赚钱 · 法律 · 在线教研 · 会员中心 · 心理测试 · 魔鬼词典 · 顺口溜
 
主页特效 网页特效 百家姓
娱乐 歇后语 绕口令 脑筋急转弯
 
谚语 谜语 名言 邮政编码
便民 酒方 验方 偏方 站长工具  
 
算命 风俗 手相 爱情
女孩 音乐 面相 星座 血型
 
饮食 穴道 偏方 医药
生活 软件 硬件 解梦 高考



   JS特效



实用工具
便民服务 加密解密
 
魅力高密 民间故事 Flash教程 PS教程 最新国内新闻
新华字典 黄道吉日 英语园地  万年历 Html2anycode
  首页 | 美图 | 短信 | 安全 | 校园 | 网站 | 游戏 | UFO | 文秘 | 生活 | 信息技术 | 论文 | 人生 | 情感 | 日记
返回首页
当前位置: 主页 > 网站建设 >

open_basedir restriction in effect的错误及其解决办法

时间:2009-12-28 23:46来源:未知 作者:admin 点击:
最近,我遇到了一个奇怪的问题 问题1: Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(../license.php) is not within the allowed path(s): (D:/mywebserver/DedeAMPZ/WebRoot/Default) in D:
  

最近,我遇到了一个奇怪的问题

问题1:

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(../license.php) is not within the allowed path(s): (D:/mywebserver/DedeAMPZ/WebRoot/Default) in D:\mywebserver\DedeAMPZ\WebRoot\Default\includes\func\common.inc.php on line 801

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(../../license.php) is not within the allowed path(s): (D:/mywebserver/DedeAMPZ/WebRoot/Default) in D:\mywebserver\DedeAMPZ\WebRoot\Default\includes\func\common.inc.php on line 806
 

问题2:

Warning: Unknown: open_basedir restriction in effect. File(D:/99Game/WEB/htdocs/index.php) is not within the allowed path(s): (D:Game\WEB\htdocs\;C:\WINDOWS\Temp;) in Unknown on line 0

Fatal error: Can't load D:/99Game/WEB/htdocs/index.php, open_basedir restriction. in Unknown on line 0
 

问题3:

Warning: imagegif() [function.imagegif]: open_basedir restriction in effect. File(C:\WINDOWS\TEMP\) is not within the allowed path(s): (C:\PHPnow\htdocs;C:\PHPnow\Temp) in C:\PHPnow\htdocs\hdzs\verify_code.php on line 11

Warning: imagegif() [function.imagegif]: Unable to open temporary file in C:\PHPnow\htdocs\hdzs\verify_code.php on line 11
 

问题4:

虚拟主机,运行一个程序时出现以下错误提示:

Warning:   file_exists():   open_basedir   restriction   in   effect.   File(/home/mainwebsite_html/cache/also_purchased-english.cache11548)   is   not   within   the   allowed   path(s):   (/var/web/w0895/:/tmp:/usr/lib/php)   in   /var/web/w0895/html/includes/functions/cache.php   on   line   47  
   
  原因是php.ini里设置了  
  opendir=/var/web/w0895/:/tmp:/usr/lib/php  


解答:

其实open_basedir 这个是用来限制php的目录访问权限什么的,如果不在允许的范围内,php就不能访问。

这个 open_basedir 在 php.ini 里可以设定,也可以在 apache的httpd.conf 里面设定


例如:
php_admin_value open_basedir "E:/APMServ5.2.6/www/wordpress/;E:/APMServ5.2.6/tmp/uploadtemp/;"

再比如:

php_admin_value open_basedir =/var/web/w0895/:/tmp:/usr/lib/php

上面问题中的描述,看字面意思好像是open_basedir受到了限制 D:Game\WEB\htdocs\;C:\WINDOWS\Temp; 不属于允许路径,php我没接触过是不是有个open_basedir的配置文件?是负责目录权限的?
php程序里的目录是D:/99Game/WEB/htdocs/index.php,但出错的目录是D:Game\WEB\htdocs\
你把D:Game\改成D:\99Game看看
 

顶一下
(4)
57.1%
踩一下
(3)
42.9%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
赞助商位置
推荐内容
杂七杂八