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(/mnt/hgfs/root/tp5/thinkphp/start.php) is not within the allowed path(s): (/mnt/hgfs/root/tp5/public/:/tmp/:/proc/)
1,我是php7 ,php.ini里面的open_basedir 是注释掉的
2,后来查找到时fastcgi的问题
3,修改fastcgi的配置文件 /usr/local/nginx/conf/fastcgi.conf

4,重启 service nginx restart
5,搞定:

thinkPHP5配置nginx环境无法打开(require(): open_basedir restriction in effect. File(/mnt/hgfs/root/tp5/thinkphp/start.php) is not within the allowed path(s)的更多相关文章
- 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 ...
- require(): open_basedir restriction in effect. File
新安装的 lnmp 环境,将项目放上报 require(): open_basedir restriction in effect. File 的错误! 错误日志显示,访问脚本不在 open_base ...
- 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 ...
- 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(/ ...
- 使用宝塔配置laravel站点时,遇到open_basedir restriction in effect. 原因与解决方法
今天一位朋友在linux服务器部署thinkphp5的时候PHP报了这个错误,如下: Warning: require(): open_basedir restriction in effect. F ...
- LNMP - Warning: require(): open_basedir restriction in effect错误解决方法
LNMP 1.4或更高版本如果不想用防跨目录或者修改.user.ini的防跨目录的目录还需要将 /usr/local/nginx/conf/fastcgi.conf 里面的fastcgi_param ...
- php 环境require(): open_basedir restriction in effect 错误
php 环境require(): open_basedir restriction in effect 错误 错误日志显示,访问脚本不在 open_basedir的限定目录里面 解决方法打开fastc ...
- 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. ...
随机推荐
- angularjs 之 $watch
双向绑定是Angular的核心概念之一,它给我们带来了思维方式的转变:不再是DOM驱动,而是以Model为核心,在View中写上声明式标签.然后,Angular就会在后台默默的同步View的变化到Mo ...
- oracle ebs常规小看点
1. 在oracle applications 11i 中如何快速获得上次查询的SQL 语句 方法:我们不必使用SQL Trace 来获得,有一个简单的办法,即:帮助->诊断->检查- ...
- nancyfx 自定义路由module
在源码的Nancy.Demo.CustomModule项目示例中 查看UglifiedNancyModule.cs文件 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 ...
- centos 7.6 开机报错信息(一):welcome to emergency mode!
welcome to emergency mode!after logging in ,type "journalctl -xb" to view system logs,&quo ...
- ubuntu16.04 安装jdk 错误解决
错误 $ apt-get install openjdk-9-jdk Errors were encountered while processing: /var/cache/apt/archives ...
- C#泛型使用小记
最近C#的泛型使用频次略多,特在此记下一个印象深刻的. 情景如下, 基类BaseClass 有一系列的子类 SubClass1, SubClass2, SubClass3... 且其构造函数的参数较多 ...
- 朋友,请待你的朋友——BUG好一点!
程序猿嘛,难免会被BUG缠身,我相信,没有一个程序猿在被BUG缠身时是感觉轻松的,消灭BUG一定是你最大的愿望.本周,我们团队的项目进入调试阶段,各种BUG层出不穷,眼看下个周就要进行项目答辩会,所以 ...
- JavaWeb -jsp文件和内置对象的解析
jsp文件和内置对象的解析 对page解析 JSP九大内置对象(自带,无需new) 1 out:输出对象 2 request:请求对象,存储“客户端像服务端发送的请求信息” 3 response:响应 ...
- Hibernate 干货
一 .hibernate概念: hibernate应用在javaee 三层框架中的dao层(web 层 --service层--dao层),在dao层实现对数据库的CRUD操作.hibernate是对 ...
- 安装zlib的过程(Compression requires the (missing) zlib module)(Python2.6升级为2.7出现的问题)
觉得有必要把解决问题的过程写下来 1,因为要安装flask,所以安装pip,所以安装setuptools,所以安装zlib.(具体过程http://www.cnblogs.com/aiyr/p/726 ...