require(): open_basedir restriction in effect. File
新安装的 lnmp 环境,将项目放上报 require(): open_basedir restriction in effect. File 的错误!
错误日志显示,访问脚本不在 open_basedir的限定目录里面,配置open_basedir 一般会在php.ini 或 nginx 配置文件里面。
发现 fastcgi.conf 中配置了open_basedir $document_root指向的是网站跟目录 /home/www/yii/web,我的项目用的是php2.0 框架需要解析 /home/www/yii 下面的php文件
由于我配置的是开发环境 ,简单粗暴就把fastcgi.conf 里面open_basedir给注释掉了,线上环境建议 把$document_root 更改为 需要解析的网站目录,或者直接改为 /use/local/nginx/html【web项目目录】。多个目录用 : 分开。
然后重启 nginx !就可以愉快的玩耍了。
require(): open_basedir restriction in effect. File的更多相关文章
- thinkPHP5配置nginx环境无法打开(require(): open_basedir restriction in effect. File(/mnt/hgfs/root/tp5/thinkphp/start.php) is not within the allowed path(s)
今天想把玩一下tp5,结果怎么都无法访问,每次都是报500错误,我把错误提示都打开看到下面的错误 require(): open_basedir restriction in effect. File ...
- Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/../thinkphp/start.php) is not within the allowed path(s):
Warning: require(): open_basedir restriction in effect. File(/www/wwwroot//../thinkphp/start.php) is ...
- require(): open_basedir restriction in effect. File(/www/wwwroot/xcx/zerg/thinkphp/start.php) is not within the allowed path(s): (/www/wwwroot/xcx/zerg/public/:/tmp/:/proc/) in /www/wwwroot/xcx/zerg/p
解决方法: 在如下文件增加一项(如图所示) 在如下文件增加一项(如图所示): #php文件采用fastcgi解析并设置参数 location ~ \.php { try_files ...
- php Warning: require(): open_basedir restriction in effect File(/www/wwwroot/default/
解决方案如下: 一.找到修改fastcgi的配置文件 (/usr/local/nginx/conf/fastcgi.conf) 二.vi进行编辑(保存退出) 三.对虚拟主机配置进行重写在Nginx低版 ...
- require(): open_basedir restriction in effect. 解决方法
在linux服务器部署thinkphp5的时候PHP报了这个错误, 如下: Warning: require(): open_basedir restriction in effect. File(/ ...
- LNMP - Warning: require(): open_basedir restriction in effect错误解决方法
LNMP 1.4或更高版本如果不想用防跨目录或者修改.user.ini的防跨目录的目录还需要将 /usr/local/nginx/conf/fastcgi.conf 里面的fastcgi_param ...
- open_basedir restriction in effect. File() is not within the allowed path(s)
目前发现eaccelerator安装之后如果php.ini中设置open_basedir将导致open_basedir的一些报错(open_basedir restriction in effect. ...
- php 环境require(): open_basedir restriction in effect 错误
php 环境require(): open_basedir restriction in effect 错误 错误日志显示,访问脚本不在 open_basedir的限定目录里面 解决方法打开fastc ...
- lnmp 环境require(): open_basedir restriction in effect 错误
最近配置开发用的lnmp环境,环境配置完成后,爆500错误,查看nginx错误日志 open_basedir 将 PHP 所能打开的文件限制在指定的目录树,包括文件本身 错误日志显示,访问脚本不在 o ...
随机推荐
- 10 quick tips for Redis
Redis is hot in the tech community right now. It's come a long way from being a small personal proje ...
- 记我安装Caffe的血泪史(2)
不知不觉居然花了一个星期来安装Caffe...真是醉了. 接上一篇blog,本以为编译完cuda,opencv之后问题就差不多了(其实本来是没有什么问题的,但硬是被我搞了一堆事情出来....) 出于对 ...
- activity(工作流)初步学习记录
1.概念 工作流(Workflow),就是“业务过程的部分或整体在计算机应用环境下的自动化”,它主要解决的是“使在多个参与者之间按照某种预定义的规则传递文档.信息或任务的过程自动进行,从而实现某个预期 ...
- php查询字符串是否存在 strpos
/*** 查询字符是否存在于某字符串** @param $haystack 字符串* @param $needle 要查找的字符* @return bool*/function str_exists( ...
- 路飞学城-Python开发-第三章
# 数据结构: # goods = [ # {"name": "电脑", "price": 1999}, # {"name&quo ...
- 原生的ajax请求----(播放托管到爱奇艺上的视频)
播放视频 $(function(){ //视频播放 $('.play-icon').click(function () { $.ajax({ type:"get", url: &q ...
- WordPress 增加 keywords 和 description
WordPress 增加 keywords 和 description . <?php $keywords = '798资源网'; $description = '798资源网'; //文章页 ...
- C# treeview绑定
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) ...
- NodeJS学习笔记 (9)网络服务-https(ok)
模块概览 这个模块的重要性,基本不用强调了.在网络安全问题日益严峻的今天,网站采用HTTPS是个必然的趋势. 在nodejs中,提供了 https 这个模块来完成 HTTPS 相关功能.从官方文档来看 ...
- PageUtil
package cn.com.qmhd.oto.common; import java.io.Serializable; import java.util.List; import org.sprin ...