同款问题:
图片是可以正常上传到 S3 存储的,在图库里面也可以看见,但是就是报错
好像是同款问题,但是搞不太懂这个人怎么解决的
https://discuss.flarum.org/d/34022-image-upload-opss-error/4
Debug内容如下:
POST https://www.waitech.cn/api/fof/upload
<br />
<b>Deprecated</b>: Optional parameter $upload declared before required parameter $contents is implicitly treated as a required parameter in <b>/www/wwwroot/www.waitech.cn/vendor/fof/upload/src/Adapters/Flysystem.php</b> on line <b>51</b><br />
<br />
<b>Warning</b>: is_readable(): open_basedir restriction in effect. File(/home/www/.aws/config) is not within the allowed path(s): (/www/wwwroot/www.waitech.cn/:/tmp/:/proc/:/www/php_session/www.waitech.cn/) in <b>/www/wwwroot/www.waitech.cn/vendor/aws/aws-sdk-php/src/DefaultsMode/ConfigurationProvider.php</b> on line <b>152</b><br />
<br />
<b>Fatal error</b>: Uncaught Laminas\HttpHandlerRunner\Exception\EmitterException: Output has been emitted previously; cannot emit response in /www/wwwroot/www.waitech.cn/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php:20
Stack trace:
#0 /www/wwwroot/www.waitech.cn/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitterTrait.php(42): Laminas\HttpHandlerRunner\Exception\EmitterException::forOutputSent()
#1 /www/wwwroot/www.waitech.cn/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitter.php(21): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->assertNoPreviousOutput()
#2 /www/wwwroot/www.waitech.cn/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(75): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->emit()
#3 /www/wwwroot/www.waitech.cn/vendor/flarum/core/src/Http/Server.php(45): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#4 /www/wwwroot/www.waitech.cn/public/index.php(26): Flarum\Http\Server->listen()
#5 {main}
thrown in <b>/www/wwwroot/www.waitech.cn/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php</b> on line <b>20</b><br />
还有神奇的地方是,flarum目录下的日志并没有记录错误,只能从浏览器控制台中看到报错。
目前环境是这样:
主机系统:Debian 11
Flarum: 1.8.5
PHP: 8.3.10
MySQL: 5.7.40-log
root@iZj6cdwczct2c6c3qlyas6Z:/www/wwwroot/www.waitech.cn# php flarum info
Flarum core: 1.8.5
PHP version: 8.3.10
MySQL version: 5.7.40-log
Loaded extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, ctype, curl, dom, filter, ftp, gd, gettext, hash, iconv, intl, json, SPL, session, pcntl, standard, mysqlnd, PDO, pdo_mysql, pdo_sqlite, Phar, posix, random, Reflection, mysqli, shmop, SimpleXML, soap, sockets, sodium, sysvsem, tokenizer, xml, xmlreader, xmlwriter, zip, fileinfo, mbstring, exif
+---------------------------------+---------+--------+
| Flarum Extensions | | |
+---------------------------------+---------+--------+
| ID | Version | Commit |
+---------------------------------+---------+--------+
| flarum-suspend | v1.8.1 | |
| flarum-flags | v1.8.0 | |
| fof-user-directory | 1.3.3 | |
| flarum-tags | v1.8.1 | |
| flarum-approval | v1.8.1 | |
| zequeen-acgembed-remastered | v1.1.2 | |
| v17development-seo | v1.8.1 | |
| michaelbelgium-discussion-views | v7.3 | |
| ianm-log-viewer | 0.1.1 | |
| fof-user-bio | 1.4.0 | |
| fof-upload | 1.5.5 | |
| fof-socialprofile | 1.1.6 | |
| fof-pretty-mail | 1.1.2 | |
| fof-polls | 2.2.4 | |
| fof-oauth | 1.6.10 | |
| fof-nightmode | 1.5.3 | |
| fof-links | 1.2.3 | |
| fof-formatting | 1.0.3 | |
| fof-drafts | 1.2.10 | |
| fof-default-user-preferences | 1.2.1 | |
| fof-best-answer | 1.4.5 | |
| fof-analytics | 1.1.0 | |
| flarum-subscriptions | v1.8.0 | |
| flarum-sticky | v1.8.0 | |
| flarum-statistics | v1.8.0 | |
| flarum-pusher | v1.8.0 | |
| flarum-nicknames | v1.8.0 | |
| flarum-mentions | v1.8.3 | |
| flarum-markdown | v1.8.0 | |
| flarum-lock | v1.8.0 | |
| flarum-likes | v1.8.0 | |
| flarum-lang-english | v1.8.0 | |
| flarum-lang-chinese-simplified | v1.3.0 | |
| flarum-emoji | v1.8.0 | |
| flarum-bbcode | v1.8.0 | |
| flagrow-sitemap | 2.2.1 | |
| clarkwinkelmann-emojionearea | 1.0.0 | |
| clarkwinkelmann-author-change | 1.0.3 | |
+---------------------------------+---------+--------+
Base URL: https://www.waitech.cn
Installation path: /www/wwwroot/www.waitech.cn
Queue driver: sync
Session driver: file
Scheduler status: core.admin.dashboard.status.scheduler.never-run
Mail driver: smtp
Debug mode: ON