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. ...
 
随机推荐
- AppleScript: Handler
			
AppleScript绝对是个奇葩的存在!不管功能有多强大. Handler有两种,一种是和OC类似的使用Label参数,一种是和javascript类似的使用括号把一堆参数都放在里面的. label ...
 - (字典树)Revenge of Fibonacci -- HDU -- 4099
			
链接: http://acm.hdu.edu.cn/showproblem.php?pid=4099 要用c++交哦, G++ MLE 不是很懂,先粘上慢慢学习 代码: #include<std ...
 - Java Float类型 减法运算时精度丢失问题
			
package test1; public class Test2 { /*** @param args*/public static void main(String[] args) { Flo ...
 - [leetcode] 12. Merge Sorted Array
			
这道题的无聊之处在于题目其实给了一些很奇怪的测试用例.比如他会给一些空的数组来,但是这个是不科学的,因为在C++中不允许定义一个空的列表,我们用的又不是那种糙又快的python,所以在这里我遇到了一些 ...
 - Vue的组件和路由
			
组件 组件 (Component) 是 Vue.js 最强大的功能之一.组件可以扩展 HTML 元素,封装可重用的代码.在较高层面上,组件是自定义元素,Vue.js 的编译器为它添加特殊功能. 组件的 ...
 - k8s 入门系列之集群安装篇
			
关于kubernetes组件的详解介绍,请阅读上一篇文章<k8s入门系列之介绍篇> Kubernetes集群安装部署 •Kubernetes集群组件: - etcd 一个高可用的K/V键值 ...
 - ubuntu 关闭和开启防火墙
			
1.关闭ubuntu的防火墙 ufw disable 2开启防火墙 ufw enable 3.卸载了iptables apt-get remove iptables 4.关闭ubuntu中的防火墙的其 ...
 - 【OCP-12c】CUUG 071题库考试原题及答案解析(14)
			
14.(6-13) choose the best answer:View the Exhibit and examine the structure of the ORDERS table.Whic ...
 - CentOS7安装weblogic集群思路梳理
			
以前经常用weblogic集群,但是却没有仔细想过要实现它.这不,前两天成功安装了weblogic集群,现在将其思路整理下.防止日后自己忘掉了. 一.安装weblogic10.3.6 1. 在官网下载 ...
 - 【经典漏洞案例】NSA黑客工具包——Windows 0day验证实验
			
还记得今年4月中旬,Shadow Brokers(影子经纪人)黑客组织发布出一份震惊世界的机密文档,其中包含了多个Windows 远程漏洞利用工具,此工具集覆盖大量的Windows服务 器,可以被任何 ...