感谢 @Snowail 提供的解决方案,亲测有效!!!
方案
【0】先上传个文件后,再查看/cloudreve/runtime/log
目录下的日志报错。
【1】如果你使用的是宝塔面板安装关闭,网站
->网站目录
-> 选择关闭防跨站攻击(open_basedir)
类似报错:
[ 2019-03-15T12:31:01+08:00 ] 39.xxx.xxx.108 POST dcpan.com/Callback/Oss
[ error ] [2]file_get_contents(): open_basedir restriction in effect. File(/etc/pki/tls/certs/ca-bundle.crt) is not within the allowed path(s): (/cloudreve/:/tmp/:/proc/)
【2】PHP版本是7.3的,配置文件里面指向/etc/pki/tls/certs/ca-bundle.crt
但是文件可能在/etc/ca-bundle.crt
。请把ca-bundle.crt
文件复制粘贴到/etc/pki/tls/certs/
目录下,如果没有该目录请自行创建。
类似报错:
[ 2019-03-15T12:34:39+08:00 ] 39.xxx.xxx.252 POST dcpan.com/Callback/Oss
[ error ] [2]failed loading cafile stream: `/etc/pki/tls/certs/ca-bundle.crt'
PHP 7.2版本下正常。