PHPnow:出现open_basedir restriction in effect错误的解决办法
2009-12-15 13:52
716 查看
php环境是通过PHPnow组件搭建起来的,由于同时有多个站点运行,加上有的还是ASP的,所以,就必须得在Apache里建立虚拟主机了,但是,创建完虚拟主机之后,所有的站都不能访问了,提示说:
Warning: Unknown: open_basedir restriction in effect. File(C:/PHPnow/vhosts/www.214114.com/index.php) is not within the allowed path(s): (C:\PHPnow hosts\www.214114.com;C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp;) in Unknown on line 0
Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
Fatal error: Unknown: Failed opening required ‘C:/PHPnow/vhosts/www.214114.com/index.php’ (include_path=’.;C:\php5\pear’) in Unknown on line 0
打开PHPnow里配置的每一个虚拟主机都是这个错误!
最后,在百度上和PHPnow的官方网站上几经搜索,终于找到答案了:建立虚拟主机的时候不限制虚拟主机权限即可!
下面详细说明一下在PHPnow里建立虚拟主机的正确步骤:
运行PnCp.cmd,选择0 -vhs 添加 虚拟主机
程序会列出现有的虚拟主机列表,在最下面输入要添加的虚拟主机的域名(也就是IIS下所谓的“主机头”)
输入主机别名(也就是将多个域名绑定到主机上,多个域名之间一定是要用空格 隔开)
指定网站目录(也就是网站程序文件所在的文件夹)
[ 如果分配此主机给其他用户, 并限制其权限, 请输入 "y";否则, 请输入 "n". 默认 Y ]
-> 限制虚拟主机权限? (Y/n):这里请一定要输入“n”,不限制权限,否则将会出现前面所说的“open_basedir restriction in effect”的错误!
Warning: Unknown: open_basedir restriction in effect. File(C:/PHPnow/vhosts/www.214114.com/index.php) is not within the allowed path(s): (C:\PHPnow hosts\www.214114.com;C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp;) in Unknown on line 0
Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
Fatal error: Unknown: Failed opening required ‘C:/PHPnow/vhosts/www.214114.com/index.php’ (include_path=’.;C:\php5\pear’) in Unknown on line 0
打开PHPnow里配置的每一个虚拟主机都是这个错误!
最后,在百度上和PHPnow的官方网站上几经搜索,终于找到答案了:建立虚拟主机的时候不限制虚拟主机权限即可!
下面详细说明一下在PHPnow里建立虚拟主机的正确步骤:
运行PnCp.cmd,选择0 -vhs 添加 虚拟主机
程序会列出现有的虚拟主机列表,在最下面输入要添加的虚拟主机的域名(也就是IIS下所谓的“主机头”)
输入主机别名(也就是将多个域名绑定到主机上,多个域名之间一定是要用空格 隔开)
指定网站目录(也就是网站程序文件所在的文件夹)
[ 如果分配此主机给其他用户, 并限制其权限, 请输入 "y";否则, 请输入 "n". 默认 Y ]
-> 限制虚拟主机权限? (Y/n):这里请一定要输入“n”,不限制权限,否则将会出现前面所说的“open_basedir restriction in effect”的错误!
相关文章推荐
- open_basedir restriction in effect的错误及其解决办法
- open_basedir restriction in effect的错误及其解决办法
- open_basedir restriction in effect错误的解决办法
- PHPExcel 出现open_basedir restriction in effect的解决办法
- open_basedir restriction in effect的错误及其解决办法
- open_basedir restriction in effect错误的解决办法
- phpnow:open_basedir restriction in effect;file is not within the allowed path的解决办法
- phpnow:open_basedir restriction in effect;file is not within the allowed path的解决办法
- php错误提示 open_basedir restriction in effect 解决
- php错误提示 open_basedir restriction in effect 解决
- php错误提示 open_basedir restriction in effect 解决
- php错误提示 open_basedir restriction in effect 解决
- PHPExcel中open_basedir restriction in effect的解决方法
- 解决 php 报错 open_basedir restriction in effect
- 软件系统报错的解决方法 Warning: is_readable() [function.is-readable]: open_basedir restriction in effect
- lnmp 环境执行yii项目出错 require(): open_basedir restriction in effect 错误
- PHPExcel中open_basedir restriction in effect的解决方法
- linux 下出现:open_basedir restriction in effect
- lnmp 环境require(): open_basedir restriction in effect 错误
- open_basedir restriction in effect,解决php引入文件权限问题