出现问题的原因:php open_basedir 配置的问题,PHP不能引入其授权目录上级及其以上的文件,之所以出现这个问题绝大多数情况是由于服务器的权限限制问题。

1、对于windows和linux解决方式基本都一样的,只是路径书写问题需要注意

2、可以尝试项目根目录下找到 user.ini 文件,直接删除掉看是否能够解决

3、nginx解决方案:

nginx.conf 或者 conf/vhost 目录下 你的域名.conf 文件或fastcgi.conf或vhost.conf,搜索 open_basedir,把:

fastcgi_param PHP_VALUE
"open_basedir=/home/wwwroot/www.thinkphp.cn/wwwroot/:/tmp/:/proc/";

改为:

fastcgi_param PHP_VALUE "open_basedir=/home/wwwroot/www.thinkphp.cn/:/tmp/:/proc/";

把目录的向上扩大,扩大能够访问的目录权限

4、apache的解决方案:
Apache 需要修改 httpd.conf 或者同目录下的 vhost 目录下 你的域名.conf 文件:

php_admin_value open_basedir "/home/wwwroot/www.thinkphp.cn/wwwroot/:/tmp/:/var/tmp/:/proc/"

改为:

php_admin_value open_basedir "/home/wwwroot/www.thinkphp.cn/:/tmp/:/var/tmp/:/proc/"

5、或者把对应的权限部分都删除掉
找到open_basedir的部分,这样就没有限定

转载于:https://blog.51cto.com/13238147/2314414

require(): open_basedir restriction in effect错误解决相关推荐

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

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

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

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

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

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

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

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

  5. require(): open_basedir restriction in effect. File

    新安装的 lnmp 环境,将项目放上报 require(): open_basedir restriction in effect. File 的错误! 错误日志显示,访问脚本不在 open_base ...

  6. 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 ...

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

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

  8. open_basedir restriction in effect,解决php引入文件权限问题

    open_basedir restriction in effect,解决php引入文件权限问题 参考文章: (1)open_basedir restriction in effect,解决php引入 ...

  9. 【lnmp】require(): open_basedir restriction in effect.【百度不是万能的,关键时刻还得靠自己】

    TP5的项目,多模块设置多多个站点入口: 推上线时一堆问题,之一:权限问题 由于所有模块公用 thinkphp框架文件,在调用时报错 require(): open_basedir restricti ...

最新文章

  1. 用友公司Java面试题(含答案)
  2. 4、linux网络编程--套接字的介绍
  3. Backup Exec for Windows Servers (BEWS) 简体中文文档汇总(持续更新)
  4. vue替换全部符合’字符串_技术成长日记-Vim实用技巧-4.7查找替换
  5. 一淘网挑战百度意在造势 人才储备成最大障碍
  6. python log
  7. keil_4/MDK各种数据类型占用的字节数
  8. 如何在Windows平台下可以方便获取到android的源码?
  9. R9000P电脑win10系统常用快捷键及使用技巧
  10. 数字图像处理成长之路13:SIFT之极值点(子像元插值)
  11. Mybatis批量update修改实例
  12. 微软官方工具_微软官方小工具,每天让你眼前一新
  13. Redis入门指南之复制
  14. 总结:min-height:100px; height:auto;的用法(新浪博客 )
  15. GPIO 按键及矩阵键盘程序------/* 自己实验确认并总结 */
  16. 数字电路实验环境 (Quartus II 9.0)
  17. C++析构函数的执行时机
  18. Hypermesh前处理+Abaqus有限元分析
  19. 美赛思光盘打印刻录机 黑匣子N6210蓝光刻录服务器
  20. HTML+CSS实现下拉菜单导航栏

热门文章

  1. Android Study Material Design 十 再探沉浸式
  2. 论文写作——用excel和ppt做好看的论文图
  3. Oracle通过SPOOL导出数据Excel、CSV、TXT格式
  4. csapp-bomblab
  5. 华氏温度转换成摄氏温度
  6. 为什么说区块链是新的博弈竞技场
  7. Linux下的多线程編程
  8. 为什么要阅读——兼分享《首先,打破一切常规》[中译文]:世界顶级管理者的成功秘诀/(美)马库斯·白金汉,(美)柯特·科夫曼 著
  9. Echarts 图表制作建议指南思维导图,教你什么数据画什么图
  10. 安笙机器人_【D~小说】《安妻》 BY 李晓雾 (机甲,穿越)