今天做上传视频裁剪视频图片的时候遇到的问题,fmpeg安装好后一直会有报错:
“file_exists(): open_basedir restriction in effect. File(/usr/local/src/**********/ffmpeg/ffprobe) is not within the allowed path(s): (/www/wwwroot/*******.com/:/tmp/)”
开始一直不知道哪里的问题,后面看自己网站的配置开启了“防跨站攻击”,一直到导致fmpeg的路径一直无法访问,权限不够。
php运行报错:is not within the allowed path(s)
找到原因:添加了防跨站,站点目录下.user.ini,文件
解决办法:关闭防跨站攻击即可,或者是在.user.ini修改此文件中的open_basedir为你网站根目录的上级目录(小编未验证修改文件直接关闭了防夸张)。
哈哈,终于是解决了这个问题
推荐