Why are PDFs available only to unregistered users?

Hi everyone.

This is a paradoxical question:
I’m working (ad editor with admin privileges) on http://www.rivistadistoriadelleducazione.it/
We have a fresh 3.0.2 installation. We have just published this journal first online issue. Everyone can read and download articles except logged-in users. That is: is you follow any link, you can view and download article, but if you log in, a 502 error pops up

Error message in PDF.js says

PDF.js v1.5.188 (build: 0e2d50f)
Messaggio: Unexpected server response (502) while retrieving PDF “http://www.rivistadistoriadelleducazione.it/index.php/RSE/article/download/18/4/”.

Clicking on the Download button, it’s quite the same: you can download the PDF if you are not logged in. But when I log in, I get a Bad Gateway (502) error message instead.

Any clue?
Thanks!

Greetings,

Have you checked php logs?

Uhm… I’m not sure I know where to begin with that, I’m sorry.
The error.log on the server has several errors like this all night long:

2017/07/03 08:38:04 [error] 14517#14517: *1341 FastCGI sent in stderr: "PHP message: PHP Strict Standards: Non-static method Request::getContext() should not be called statically, assuming $this from incompatible context in /var/www/clients/client16/web40/web/lib/pkp/classes/plugins/ThemePlugin.inc.php on line 409

and some stuff like this in the morning

2017/07/03 09:22:47 [error] 14517#14517: *3561 FastCGI sent in stderr: “PHP message: PHP Strict Standards: Declaration of SubmissionFileDAO::fromRow() should be compatible with that of PKPSubmissionFileDAO::fromRow() in /var/www/clients/client16/web40/web/classes/article/SubmissionFileDAO.inc.php on line 23” while reading upstream, client: 62.205.2.86, server: rivistadistoriadelleducazione.it, request: “GET /index.php/RSE HTTP/1.1”, upstream: “fastcgi://unix:/var/lib/php7.0-fpm/web40.sock:”, host: “www.rivistadistoriadelleducazione.it”, referrer: “http://www.rivistadistoriadelleducazione.it/index.php/RSE

or this

2017/07/03 09:48:32 [error] 14517#14517: *4896 upstream prematurely closed FastCGI stdout while reading response header from upstream, client: 62.205.2.86, server: rivistadistoriadelleducazione.it, request: “GET /index.php/RSE/article/download/22/9 HTTP/1.1”, upstream: “fastcgi://unix:/var/lib/php7.0-fpm/web40.sock:”, host: “www.rivistadistoriadelleducazione.it”, referrer: “http://www.rivistadistoriadelleducazione.it/plugins/generic/pdfJsViewer/pdf.js/build/pdf.worker.js

along with

2017/07/03 10:07:29 [error] 14517#14517: *5438 FastCGI sent in stderr: "PHP message: PHP Strict Standards: Declaration of LocaleFileListbuilderHandler::initialize() should be compatible with that of ListbuilderHandler::initialize() in /var/www/clients/client16/web40/web/plugins/generic/translator/controllers/listbuilder/LocaleFileListbuilderHandler.inc.php on line 143

Well, it’s a huge file… what should I look for?

check this stackoverflow topic: php - Upstream prematurely closed FastCGI stdout while reading response header from upstream - Stack Overflow or similar topics