require(): open_basedir restriction in effect错误解决
出现问题的原因: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错误解决相关推荐
- LNMP - Warning: require(): open_basedir restriction in effect错误解决方法
LNMP - Warning: require(): open_basedir restriction in effect错误解决方法 参考文章: (1)LNMP - Warning: require ...
- 在宝塔部署出现require(): open_basedir restriction in effect. File解决办法
在宝塔部署出现require(): open_basedir restriction in effect. File解决办法 报错代码: Warning: require(): open_basedi ...
- require(): open_basedir restriction in effect. 解决方法
require(): open_basedir restriction in effect. 解决方法 参考文章: (1)require(): open_basedir restriction in ...
- php warning require,Thinkphp 网站打开提示Warning: require(): open_basedir restriction in effect另一种解决方法...
Thinkphp网站打开报错如下: Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/123.com/ ...
- require(): open_basedir restriction in effect. File
新安装的 lnmp 环境,将项目放上报 require(): open_basedir restriction in effect. File 的错误! 错误日志显示,访问脚本不在 open_base ...
- 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 ...
- 宝塔部署项目报Warning: require(): open_basedir restriction in effect的解决方案
宝塔部署项目报Warning: require(): open_basedir restriction in effect的解决方案 参考文章: (1)宝塔部署项目报Warning: require( ...
- open_basedir restriction in effect,解决php引入文件权限问题
open_basedir restriction in effect,解决php引入文件权限问题 参考文章: (1)open_basedir restriction in effect,解决php引入 ...
- 【lnmp】require(): open_basedir restriction in effect.【百度不是万能的,关键时刻还得靠自己】
TP5的项目,多模块设置多多个站点入口: 推上线时一堆问题,之一:权限问题 由于所有模块公用 thinkphp框架文件,在调用时报错 require(): open_basedir restricti ...
最新文章
- 用友公司Java面试题(含答案)
- 4、linux网络编程--套接字的介绍
- Backup Exec for Windows Servers (BEWS) 简体中文文档汇总(持续更新)
- vue替换全部符合’字符串_技术成长日记-Vim实用技巧-4.7查找替换
- 一淘网挑战百度意在造势 人才储备成最大障碍
- python log
- keil_4/MDK各种数据类型占用的字节数
- 如何在Windows平台下可以方便获取到android的源码?
- R9000P电脑win10系统常用快捷键及使用技巧
- 数字图像处理成长之路13:SIFT之极值点(子像元插值)
- Mybatis批量update修改实例
- 微软官方工具_微软官方小工具,每天让你眼前一新
- Redis入门指南之复制
- 总结:min-height:100px; height:auto;的用法(新浪博客 )
- GPIO 按键及矩阵键盘程序------/* 自己实验确认并总结 */
- 数字电路实验环境 (Quartus II 9.0)
- C++析构函数的执行时机
- Hypermesh前处理+Abaqus有限元分析
- 美赛思光盘打印刻录机 黑匣子N6210蓝光刻录服务器
- HTML+CSS实现下拉菜单导航栏
热门文章
- Android Study Material Design 十 再探沉浸式
- 论文写作——用excel和ppt做好看的论文图
- Oracle通过SPOOL导出数据Excel、CSV、TXT格式
- csapp-bomblab
- 华氏温度转换成摄氏温度
- 为什么说区块链是新的博弈竞技场
- Linux下的多线程編程
- 为什么要阅读——兼分享《首先,打破一切常规》[中译文]:世界顶级管理者的成功秘诀/(美)马库斯·白金汉,(美)柯特·科夫曼 著
- Echarts 图表制作建议指南思维导图,教你什么数据画什么图
- 安笙机器人_【D~小说】《安妻》 BY 李晓雾 (机甲,穿越)