lnmp 环境执行yii项目出错 require(): open_basedir restriction in effect 错误
来源:互联网 发布:王者荣耀显示网络异常 编辑:程序博客网 时间:2024/06/08 13:27
1、最近配置开发用的lnmp环境,环境配置完成后,爆500错误,查看nginx错误日志:
2、open_basedir 将 PHP 所能打开的文件限制在指定的目录树,包括文件本身
错误日志显示,访问脚本不在 open_basedir的限定目录里面,配置open_basedir 一般会在php.ini 或 nginx 配置文件里面
首先检测php.ini 我发现并没有配置 open_basedir
3、cd /usr/local/nginx/进入nginx目录,在nginx目录下检测nginx配置
cd /usr/local/nginx/
grep -rn open_basedir ./
[注]执行完grep -rn open_basedir ./ 出现 : /conf/fastcgi.conf:27:#fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";
发现 fastcgi.conf 中配置了open_basedir $document_root指向的是网站跟目录 /home/www/yii/web,我的项目用的是php2.0 框架需要解析
/home/www/yii 下面的php文件,
由于我配置的是开发环境 ,简单粗暴就把fastcgi.conf 里面open_basedir给注释掉了,线上环境建议 把$document_root 更改为 需要解析的网站目录
然后就可以愉快的玩耍了
原文链接:http://www.cnblogs.com/dongkang/p/6732832.html
- lnmp 环境执行yii项目出错 require(): open_basedir restriction in effect 错误
- require(): open_basedir restriction in effect. File
- Warning: require(): open_basedir restriction in effect.
- Warning: require(): open_basedir restriction in effect.
- open_basedir restriction in effect错误的解决办法
- open_basedir restriction in effect错误解决方法
- open_basedir restriction in effect
- Warning: require(): open_basedir restriction in effect. File(/home/framework/laravel/
- open_basedir restriction in effect的错误及其解决办法
- Warning: file_exists(): open_basedir restriction in effect. File 错误的解决办法
- open_basedir restriction in effect的错误及其解决办法
- php错误提示 open_basedir restriction in effect 解决
- php错误提示 open_basedir restriction in effect 解决
- linux 下出现:open_basedir restriction in effect
- PHPExcel中open_basedir restriction in effect的解决方法
- PHPExcel 出现open_basedir restriction in effect的解决办法
- 解决 php 报错 open_basedir restriction in effect
- php 运行时 is not writable、open_basedir restriction in effect
- Spring AOP
- SD卡fat32文件格式说明
- 如何将session存入redis或memcache
- Kotlin高阶函数及Lambda表达式解析
- Struts框架中的DispathchAction
- lnmp 环境执行yii项目出错 require(): open_basedir restriction in effect 错误
- 8月23号总结
- Spark 本地模式
- Android技术之 必备而又容易忽视的知识 Gradle的高级用法
- 深度学习——从代码开始
- tensorflow可视化tensorboard “No graph definition files were found.” 错误
- 全面理解Java内存模型
- 读论文《Efficient Estimation of Word Representations in Vector Space》
- Struts2 实现多文件上传