require(): open_basedir restriction in effect. File
新安装的 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相关推荐
- 在宝塔部署出现require(): open_basedir restriction in effect. File解决办法
在宝塔部署出现require(): open_basedir restriction in effect. File解决办法 报错代码: Warning: require(): open_basedi ...
- 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 ...
- 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 ...
- require(): open_basedir restriction in effect. File(/www/wwwroot/wei/files/vendor/autoload.php)
这个错误我遇见两次了,第一次在网上查了很多资料,也没记录,反正解决了,没理解什么意思,这次又出来了,好好的理解了一下 大概意思就是访问权限问题,网上介绍了很多的办法,大部分没什么作用,我使用的是lar ...
- php warning require,Thinkphp 网站打开提示Warning: require(): open_basedir restriction in effect另一种解决方法...
Thinkphp网站打开报错如下: Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/123.com/ ...
- 宝塔部署项目报Warning: require(): open_basedir restriction in effect的解决方案
宝塔部署项目报Warning: require(): open_basedir restriction in effect的解决方案 参考文章: (1)宝塔部署项目报Warning: require( ...
- 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. 解决方法
require(): open_basedir restriction in effect. 解决方法 参考文章: (1)require(): open_basedir restriction in ...
- 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 ...
最新文章
- 通过yum安装配置lamp
- 怎样查找this的指向
- C语言函数 snprintf()(发送有限字符截断字符串输出到 str 所指向的字符串)(字符串拼接、截断拼接)
- 2018.5.5信息安全铁人三项赛数据赛复现
- SAP CRM Fiori my Opportunity Etag handling
- 如何修改以及删除数据库中的表
- Latex文本文档的排版
- 新开局哦----!!!
- 微信小程序开发——字体样式设置
- 中小学数字化标准音乐教室建设及设备配套方案
- Python+tkinter模拟京东登录时拖动图片式验证码
- 转帖:三种快乐物质——多巴胺、血清素、内啡肽
- windows11设置chrome谷歌浏览器为默认浏览器
- php能不能用super,supersu怎么用
- 微机原理与接口技术模拟试题微型计算机中主要包括,微机原理与接口技术模拟试题...
- 狂神说Spring学习笔记————(一发入魂)
- 计算机辅助测试图示,计算机基础知识:计算机辅助测试
- 挺带劲!通过 Nginx 来实现封杀恶意访问
- Java干货(一)----Java重写时应当遵守的10条规则
- Java参数变量_Java变量参数