The issue
I am using php 7.4. After I installed a plug-in that I don’t know, an error will be reported after saving in the settings. The debug information is as follows. But the save is successful after refreshing the page.
It seems to be due to a cache file error, I have set the permissions of the flarum directory to 775, but the cache file permissions created are 644 and even after I manually set 755, it will report an error after a while and return to 644.
Flarum information
POST https://website/api/settings
<br />
<b>Warning</b>: file_put_contents(/www/wwwroot/website/storage/cache/ee/2f/ee2f842aa7bb1f53edf3a2ed2c09a1807ffa6c90): failed to open stream: Permission denied in <b>/www/wwwroot/website/vendor/illuminate/filesystem/Filesystem.php</b> on line <b>187</b><br />
<br />
<b>Fatal error</b>: Uncaught Laminas\HttpHandlerRunner\Exception\EmitterException: Output has been emitted previously; cannot emit response in /www/wwwroot/website/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php:24
Stack trace:
#0 /www/wwwroot/website/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitterTrait.php(40): Laminas\HttpHandlerRunner\Exception\EmitterException::forOutputSent()
#1 /www/wwwroot/website/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitter.php(27): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->assertNoPreviousOutput()
#2 /www/wwwroot/website/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(98): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->emit()
#3 /www/wwwroot/website/vendor/flarum/core/src/Http/Server.php(45): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#4 /www/wwwroot/website/public/index.php(26): Flarum\Http\Server->listen()
#5 {main}
thrown in <b>/www/wwwroot/website/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php</b> on line <b>24</b><br />