新安装的 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相关推荐

  1. 在宝塔部署出现require(): open_basedir restriction in effect. File解决办法

    在宝塔部署出现require(): open_basedir restriction in effect. File解决办法 报错代码: Warning: require(): open_basedi ...

  2. laravel 线上报错Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/ytsjk/bootstra

    laravel 线上 Warning: require(): open_basedir restriction in effect. File(/home/wwwroot/default/larave ...

  3. THINKPHP搭建报错Warning: require(): open_basedir restriction in effect.File() is not within the allowed

    注意:当前只适用于LNMP环境 会提示 Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/wxsmal ...

  4. require(): open_basedir restriction in effect. File(/www/wwwroot/wei/files/vendor/autoload.php)

    这个错误我遇见两次了,第一次在网上查了很多资料,也没记录,反正解决了,没理解什么意思,这次又出来了,好好的理解了一下 大概意思就是访问权限问题,网上介绍了很多的办法,大部分没什么作用,我使用的是lar ...

  5. php warning require,Thinkphp 网站打开提示Warning: require(): open_basedir restriction in effect另一种解决方法...

    Thinkphp网站打开报错如下: Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/123.com/ ...

  6. 宝塔部署项目报Warning: require(): open_basedir restriction in effect的解决方案

    宝塔部署项目报Warning: require(): open_basedir restriction in effect的解决方案 参考文章: (1)宝塔部署项目报Warning: require( ...

  7. LNMP - Warning: require(): open_basedir restriction in effect错误解决方法

    LNMP - Warning: require(): open_basedir restriction in effect错误解决方法 参考文章: (1)LNMP - Warning: require ...

  8. require(): open_basedir restriction in effect. 解决方法

    require(): open_basedir restriction in effect. 解决方法 参考文章: (1)require(): open_basedir restriction in ...

  9. PHP 导出Excel 报错:realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed

    PHP 导出Excel 报错:realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed  ...

最新文章

  1. 通过yum安装配置lamp
  2. 怎样查找this的指向
  3. C语言函数 snprintf()(发送有限字符截断字符串输出到 str 所指向的字符串)(字符串拼接、截断拼接)
  4. 2018.5.5信息安全铁人三项赛数据赛复现
  5. SAP CRM Fiori my Opportunity Etag handling
  6. 如何修改以及删除数据库中的表
  7. Latex文本文档的排版
  8. 新开局哦----!!!
  9. 微信小程序开发——字体样式设置
  10. 中小学数字化标准音乐教室建设及设备配套方案
  11. Python+tkinter模拟京东登录时拖动图片式验证码
  12. 转帖:三种快乐物质——多巴胺、血清素、内啡肽
  13. windows11设置chrome谷歌浏览器为默认浏览器
  14. php能不能用super,supersu怎么用
  15. 微机原理与接口技术模拟试题微型计算机中主要包括,微机原理与接口技术模拟试题...
  16. 狂神说Spring学习笔记————(一发入魂)
  17. 计算机辅助测试图示,计算机基础知识:计算机辅助测试
  18. 挺带劲!通过 Nginx 来实现封杀恶意访问
  19. Java干货(一)----Java重写时应当遵守的10条规则
  20. Java参数变量_Java变量参数

热门文章

  1. loadrunner没有 demo_scenario.lrs
  2. 竞争-冒险现象及其消除方法
  3. 知道吗,你和高级工程师差距巨大
  4. LabVIEW控制Arduino实现示波器(基础篇—7)
  5. 思岚科技—SLAMTEC邀你参加美国CES展会
  6. 《经典算法案例》01-09:如何打印质数表(十列版)
  7. 【算法比赛】2020 力扣杯!Code Your Future 春季全国编程大赛
  8. 风机性能测试的软件设计,风机性能测试系统
  9. n5105和n5095差距
  10. Spine在游戏中的使用