open_basedir 报错
Warning: require(): open_basedir restriction in effect. File(/home/www/blog/vendor/autoload.php) is not within the allowed path(s): (/home/www/blog/public/:/tmp/:/proc/) in /home/www/blog/public/index.php on line 25
Warning: require(/home/www/blog/vendor/autoload.php): failed to open stream: Operation not permitted in /home/www/blog/public/index.php on line 25
Fatal error: require(): Failed opening required '/home/www/blog/public/../vendor/autoload.php' (include_path='.:/usr/local/php/lib/php') in /home/www/blog/public/index.php on line 25
自己的laravel项目一直报错,很惆怅,网上的答案
排查php一定要打开 display_errors
、分析错误内容
查看问题描述以及资料,发现是php open_basedir 配置的问题,php不能引入其授权目录上级及其以上的文件,默认配置在php.ini(/usr/local/php/etc/php.ini),但是我的open_basedir 并没有配置,默认被注释了。
文献说可能在服务器配置目录下,如nginx、Apache等,于是用户sublime打开nginx进行全局搜索,open_base,果真还是搜到了,如下图
四、修改配置
line 27 是默认配置,默认配置是nginx.conf root 文件下的权限目录
line 27 我复制了一行改了授权目录 改成了项目文件夹的上级,重启nginx,项目可以打开了。
五、总结
就是open_basedir 配置项的文件权限问题,如果你们也遇到了这样的情况,把php.ini 服务器nginx、Apache的配置文件都检查下。
open_basedir 报错的更多相关文章
- 宝塔面板搭载yii2.0项目关于open_basedir报错解决办法
昨天配置完宝塔的lamp后,然后把原本的yii项目放上去,发现出现三个报错,就是大概 require openssl之类的三个错误 然后去宝塔的界面里去配置了一个端口,然后再去阿里云上开放这个端口 ...
- 解决 php 报错 open_basedir restriction in effect或者nginx提示No input file specified怎么办
解决 php 报错 open_basedir restriction in effect或者nginx提示No input file specified怎么办 问题是出现在了PHP.INI上面了 ,原 ...
- lnmp 系统500 报错
分析点: 1 文件目录权限不足 如果日志缓存目录没有写入权限 chmod -R 775 目录 2 lnmp 一键安装包 查看.user.ini ,其中open_basedir 不要设置到public ...
- [Linux]lnmp一键安装包,访问yii/tp5/laravel的时候,报错500或者空白页面
当你将默认的访问路径改后(nginx.conf中的root 之后的路径),同时应该将/home/wwwroot/default/.user.ini 中的路径也改了! .user.ini 是隐藏文件,需 ...
- TP5报错总结
LNMP一键安装包上部署TP5项目500错误或者空白解决 [问题原因] TP5的入口文件在public下,当他调用类文件时,跨目录所以造成500错误,或者一片空白的问题 [解决方法] 1.public ...
- thinkphp5报错
thinkPHP5配置nginx环境无法打开(require():open_basedirrestrictionineffect.File(/mnt/hgfs/ro (2018-07-19 22:05 ...
- thinkphp 5.0 lnmp环境下 无法访问,报错500(public目录)
两种方法: 1.修改fastcgi的配置文件 /usr/local/nginx/conf/fastcgi.conf fastcgi_param PHP_ADMIN_VALUE "open_b ...
- 打开nginx配置的站点报错500
打开站点报错500的原因 有很多,这里只说明一点:nginx 的fastcgi.conf配置引起的问题 环境说明 1 站点目录结构 wwwroot website public application ...
- Unknown: o pen_basedir restriction in effect. File(XXX) is not within the allo wed path(s): (XXX:/tmp/:/proc/) in Unknown on line 0报错解决
报错: [error] 12321#0: *92386 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: open_ba ...
随机推荐
- 讨论几种数据列Column的特性(上)
之前笔者写过一个系列<索引列的usable和visible>(http://space.itpub.net/17203031/viewspace-688135),详细讨论了索引列的usab ...
- [codeforces500E]New Year Domino
[codeforces500E]New Year Domino 试题描述 Celebrating the new year, many people post videos of falling do ...
- 刺激(codevs 1958)
题目描述 Description saffah的一个朋友S酷爱滑雪,并且追求刺激(exitement,由于刺激过度导致拼写都缺了个字母),喜欢忽高忽低的感觉.现在S拿到了一张地图,试图制定一个最长路径 ...
- python之模块随笔记-sys
模块名:sys sys.argv 实现从程序外部向程序传递参数 sys.path 返回模块的搜索路径,初始化时使用PYTHONPATH环境变量的值 sys.modules.keys() 返回所有已经导 ...
- 用 字蛛 取出需要的字符应用字体 @font-face
一.安装font-spider npm install font-spider -g 二.目录结构 font-spider font FZZZHONGHJW.ttf font.html 三.font. ...
- [bzoj3436]小K的农场_差分约束
小K的农场 bzoj-3436 题目大意:给定n个点,每个节点有一个未知权值.现在有m个限制条件,形如:点i比点j至少大c,点i比点j至多大c或点i和点j相等.问是否可以通过给所有点赋值满足所有限制条 ...
- 饭卡-HDU2546(01背包)
http://acm.hdu.edu.cn/showproblem.php?pid=2546 饭卡 Time Limit: 5000/1000 MS (Java/Others) Memory L ...
- Git回退---reset和revert
今天学习了git回退的两个命令,现在总结一下: 1.git reset 如果想回退错误的提交C和D,只要把指针移到B上 git reset --hard a0fvf8 而这时候,远程仓库的指针还在D上 ...
- LTTNG 使用
http://lttng.org/docs/#doc-channel http://www.cnblogs.com/suncoolcat/p/3366045.html http://blog.csdn ...
- 新IOS编程语言 Swift 新编译器Xcode6
https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_ ...