None of the PDF files can be viewed or downloaded after Upgraded to OJS 3

Hi all,

@Andrzej, the original question on this thread is about upgrades and I’m not sure your situation is the same. Can you post your question as a new thread?

@bluechiptec, what version of PHP are you running?

Regards,
Alec Smecher
Public Knowledge Project Team

Problem already solved.

Dear Andrzej,
Can you post the details on how you could able to solve this problem?
Because many of ojs users facing these problem and could not able to get the clear picture on how to solve this.
Hope you will help us in this regard.
VJ.

Hey, @Andrzej

How did you solve it?

Tks

I have this challenge, kindly share how you solved yours for us to try it out

Hello,

I seem to be having the same issue with my galley files. None of the PDF or HTML files can be viewed. If I disable the HTML Viewer plugin, HTML files may be downloaded, yet only a small rectangle is shown when I try to visualize the HTML.

PDF files give me the stream must have data error as indicated by many other users.

However, the file permissions are correct (755 and 644 for directories and files respectively). I tried changing the file of a HTML galley and the process was successful, yet the result when I click the HTML button is a small rectangle with the html inside. At least it shows something inside, as opposed to the rest of the galleys that can’t be seen. But I still think this is a problem.
error_forum

The platform needs to be active and online as we’re trying to get the ISSN so I wouldn’t like having to restore the security backup and trying to upgrade again. (I didn’t get any errors on the upgrade, by the way.) Could someone please help? Is there any way this can be solved without having to restore a backup and upgrading again?

When you receive message Stream must have data
that means that OJS cannot access pdf files. Thus, permissions and path are usually th eprobelm so pay attention more to those details.

please help me…
i didnt find any solution for this problem. i have upgrade ojs from 2.X to 3.X. after this, i cannt view and download pdf files. please help me

Did you check what I wrote in previous post?
Please post screenshot what you see when you clik on pdf.

thank you for the response… i’ve solved it by changing the files dir in config.php.

Hi have de same problem: i can’t view pdf and download after upgrade. I upgrade from version 2.4.4.0 to 3.1.1 by unpacking with php command: php tools/upgrade.php. Update was successfull. In error log don’t appear any line about this error. Value of files_dir (in config.inc.php) is = /srv/www/edicions.uib.es/web/ojs/uploads/ this is right because a path of pdf is: > /srv/www/edicions.uib.es/web/ojs/uploads/journals/journal_number/articles/article_number/public/pdf_name.pdf. Check permissions and are right. My operating system is a Centos because slashes are right in a path. Any idea of fail?
Thank you very much for spend your time.
Regards
Katia Gonzalez

Hi @KatiaUIB,

Is your files_dir inside your web root? If so, unless you’ve protected it from direct access using e.g. a .htaccess file, your installation might be unsafe. See the “Recommended Configuration” section of docs/README for details.

What kinds of submission filenames are you seeing in your files_dir after the upgrade?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher:
Yes, my files_dir is inside my web root but it isn’t directly accessible. Efectively this is protected by .htaccess file. Thank you very much for your concern.
I can’t see any kinds of submission filenames (docx, pdf, jpg) after the upgrade.
Today I see at browser console a Warning message when i try to view any of these files. The warning message is: Empty string passed to getElementById() jquery.min.js 2:24314. I do not know if this information will be useful.
Thank you very much.
Regards,
Katia Gonzalez

Hi @KatiaUIB,

You mentioned files with paths/names like /srv/www/edicions.uib.es/web/ojs/uploads/journals/journal_number/articles/article_number/public/pdf_name.pdf in your post above – what specifically do you see for pdf_name.pdf?

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher:
Thank you very much for your answer. When I try to view a pdf file, for example: a pdf with path: /srv/www/edicions.uib.es/web/ojs/uploads/journals/6/articles/379/public/379-1945-1-PB.pdf, This is what I see console_error_pdf_OJS
Thank you very much for your time.
Regards,
Katia Gonzalez

Hi @KatiaUIB,

Have a look e.g. at this thread: [Solved] Can't see PDFs after upgrade to 3.1.1.4 - #4 by asmecher

Regards,
Alec Smecher
Public Knowledge Project Team