An unexpected error has occurred. ojs 3 this probleem

hallo guys,


I experienced this error where every time I created a dashboard a pop up like that would appear and all activities could not be carried out

eror log:
thrown in /www/wwwroot/jurnal.ummi.ac.id/lib/pkp/lib/vendor/slim/slim/Slim/App.php on line 621" while reading response header from upstream, client: 162.158.190.55, server: jurnal.ummi.ac.id, request: "GET /index.php/japp/api/v1/submissions?status=1&searchPhrase=&count=20&offset=0&=1716866722270 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi-72.sock:", host: "jurnal.ummi.ac.id", referrer: "https://jurnal.ummi.ac.id/index.php/japp/submissions"
2024/05/28 10:25:28 [error] 828#0: *451 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught RuntimeException: Unexpected data in output buffer. Maybe you have characters before an opening <?php tag? in /www/wwwroot/jurnal.ummi.ac.id/lib/pkp/lib/vendor/slim/slim/Slim/App.php:621
Stack trace:
#0 /www/wwwroot/jurnal.ummi.ac.id/lib/pkp/lib/vendor/slim/slim/Slim/App.php(317): Slim\App->finalize(Object(APIResponse))
#1 /www/wwwroot/jurnal.ummi.ac.id/lib/pkp/classes/core/APIRouter.inc.php(115): Slim\App->run()
#2 /www/wwwroot/jurnal.ummi.ac.id/lib/pkp/classes/core/Dispatcher.inc.php(143): APIRouter->route(Object(Request))
#3 /www/wwwroot/jurnal.ummi.ac.id/lib/pkp/classes/core/PKPApplication.inc.php(281): Dispatcher->dispatch(Object(Request))
#4 /www/wwwroot/jurnal.ummi.ac.id/index.php(69): PKPApplication->execute()
#5 {main}

Current version: 3.2.1.4

please help me

Hello @Dennis_Saputra

I’ve seen a post like this recently and the problem was related to a folder permissions misconfiguration. Maybe you can check that your server has proper access to public, cache, etc.

Ref:

Hi @Dennis_Saputra,

I would suggest looking at the page source for the /index.php/japp/api/v1/submissions?status=1&searchPhrase=&count=20&offset=0 request. It should be a JSON response, but I suspect you have some content at the start of the file that shouldn’t be there, even an unexpected newline character. This usually comes from an inadvertent modification to a PHP file, as the warning suggests (“Maybe you have characters before an opening <?php tag?”).

Regards,
Alec Smecher
Public Knowledge Project Team

So I have to check which file, because previously I didn’t modify the code on the OJS

I have tried changing the permissions on var/tmp but the same error still appears

Hi @Dennis_Saputra,

Did you check the page source for the URL I suggested above? What did it show?

Regards,
Alec Smecher
Public Knowledge Project Team

produces text like this

Hi @Dennis_Saputra,

Have a look at this thread – it looks like something has modified your OJS to add spam links. If your files_dir (see config.inc.php) is web-accessible, that’s probably how it happened. Unfortunately it’s impossible to tell from here which file has been modified; I’d recommend trying a standard tool like diff to compare your installation against a fresh download of the same version.

Regards,
Alec Smecher
Public Knowledge Project Team

what can I check for files in OJS

i have same problem with Dennis and I have tried to compare file config.inc.php from my installed OJS with fresh file like your suggestion.
nothing different both of them, except name file, url of journal

Problem still not solved. Please give suggestion