thinkPHP5配置nginx环境无法打开(require():open_basedirrestrictionineffect.File(/mnt/hgfs/ro

(2018-07-19 22:05:27)

  分类: linux

php报错

PHP Warning:  require(): open_basedir restriction in effect. File(/home/wwwroot/xxx.com/vendor/autoload.php) is not within the allowed path(s): (/home/wwwroot/xxx.com/public/:/tmp/:/proc/) in /home/wwwroot/xxx.com/public/index.php on line 24

Jul 19 21:55:04 localhost : PHP Warning:  require(/home/wwwroot/xxx.com/vendor/autoload.php): failed to open stream: Operation not permitted in /home/wwwroot/xxx.com/public/index.php on line 24

Jul 19 21:55:04 localhost : PHP Fatal error:  require(): Failed opening required '/home/wwwroot/xxx.com/public/../vendor/autoload.php' (include_path='.:/usr/local/php/lib/php') in /home/wwwroot/xxx.com/public/index.php on line 24

1,我是php7 ,php.ini里面的open_basedir 是注释掉的

2,后来查找到时fastcgi的问题

3,修改fastcgi的配置文件 /usr/local/nginx/conf/fastcgi.conf

重启nginx 搞定

thinkphp5报错的更多相关文章

  1. thinkPHP5 报错session_start(): No session id returned by function解决方法

    这是因为用Redis接管了session状态储存,但是Redis又连接不正常导致的 在服务器上查看Redis运行状态一切正常,set.get也没有问题,最后琢磨了半天才发现是PHPRedis扩展没有安 ...

  2. Ubuntu composer 安装thinkphp5 失败,报错:[ErrorException] mkdir(): Permission denied

    在Linux环境下,使用composer安装thinkphp5,安装时,报错:[ErrorException]               mkdir(): Permission denied : 看 ...

  3. ThinkPHP5中出现unserialize()报错

    简述 unserialize(): Error at offset 533 of 1857 bytes 发现问题 dump一下出错的位置的变量,可以发现是缓存出了问题,改了名字的文件的路径对不上 解决 ...

  4. Thinkphp5.1 模板路径报错

    版本:5.1.24   ,windows环境 报错: 模板文件不存在:template\index\default\index\index.html 1.报错原因:linux/windows   对大 ...

  5. thinkphp5出现mkdir() Permission denied报错解决办法

    如果没有runtime目录,则需要手动创建一个,并且给runtime添加权限: mkdir runtime chmod -R 777 runtime 报错如下:

  6. thinkphp 5.0 lnmp环境下 无法访问,报错500(public目录)

    两种方法: 1.修改fastcgi的配置文件 /usr/local/nginx/conf/fastcgi.conf fastcgi_param PHP_ADMIN_VALUE "open_b ...

  7. Windows 7上执行Cake 报错原因是Powershell 版本问题

    在Windows 7 SP1 电脑上执行Cake的的例子 http://cakebuild.net/docs/tutorials/getting-started ,运行./Build.ps1 报下面的 ...

  8. 关于VS2015 ASP.NET MVC添加控制器的时候报错

    调试环境:VS2015 数据库Mysql  WIN10 在调试过程中出现类似下两图的同学们,注意啦. 其实也是在学习的过程中遇到这个问题的,找了很多资料都没有正面的解决添加控制器的时候报错的问题,还是 ...

  9. php报错 ----> Call to undefined function imagecreatetruecolor()

    刚才在写验证码的时候,发现报错,然后排查分析了一下,原来是所用的php版本(PHP/5.3.13)没有开启此扩展功能. 进入php.ini 找到extension=php_gd2.dll ,将其前面的 ...

随机推荐

  1. 【测试123】ISTQB AL

    近一年时间加强了金融领域基础知识,希望能顺利获得FRM认证. 接下来因为工作需要,在测试工程师的角色上有所深入发展. 仔细想了下,一是管理上的角色转换,如何协调各个不同测试级别,以及如何成为一个称职满 ...

  2. Docker技术入门与实战 第二版-学习笔记-7-数据管理(volume)

    Docker 数据管理 为什么要进行数据管理呢?因为当我们在使用container时,可能会在里面创建一些数据或文件,但是当我们停掉或删除这个容器时,这些数据或文件也会同样被删除,这是我们并不想看见的 ...

  3. MyBatis实战之配置

    MyBatis最重要的配置也就两个,一个是mybatis-config.xml,又称MyBatis的全局配置,另一个就是XXXDao.xml或XXXMapper.xml映射配置. mybatis-co ...

  4. Python中__init__()方法注意点

    此文转自https://www.cnblogs.com/zyxstar2003/archive/2011/03/21/1989954.html 1.__init__并不相当于C#中的构造函数,执行它的 ...

  5. eclipse导出可执行jar包步骤

    按步骤图文说明 第一步:选择要导出的工程,右键[export] 第二步:双击Java文件夹下的[Runnable Jar File] 第三步:该步骤分4步走 3.1 从下拉框选择该jar的入口文件,即 ...

  6. leetcode338—Counting Bits

    Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the ...

  7. cocoapods 报错

    1.[!] ERROR: Parsing unable to continue due to parsing error: contained in the file located at xxx/x ...

  8. dirname(__FILE__) === __DIR__

    dirname(__FILE__) === __DIR__get_class($this) == __CLASS__

  9. Transaction Check Error:file /usr/libexec/getconf/default conflicts between attempted installs of gcc-6.4.1-1.fc25.i686 and gcc-6.4.1-1.fc25.x86_64

    今天在我的ubuntu系统上使用yum来安装软件时出错了错误:Transaction Check Error:file /usr/libexec/getconf/default conflicts b ...

  10. 林帆:Docker运行GUI软件的方法

    继上周的“Kubernetes v1.0特性解析”分享之后,本周我们邀请到ThoughtWorks咨询师林帆为大家带来主题为“Docker运行GUI软件的方法”的分享. 嘉宾简介:林帆,Thought ...