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/ on line 621" while reading response header from upstream, client:, server:, 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: "", referrer: ""
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/
Stack trace:
#0 /www/wwwroot/ Slim\App->finalize(Object(APIResponse))
#1 /www/wwwroot/ Slim\App->run()
#2 /www/wwwroot/ APIRouter->route(Object(Request))
#3 /www/wwwroot/ Dispatcher->dispatch(Object(Request))
#4 /www/wwwroot/ PKPApplication->execute()
#5 {main}

Current version:

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.


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?”).

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?

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 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.

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 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