I have also faced the same problem. None of the PDF files in the published issues can be viewed or downloaded.
While reading these treads I found the thread on “Security issue: Hacking via submission in OJS 2.4.8” . Following the article I investigated my own system and found that mine was also hacked by the same way.
As suggested, now I have moved the files_dir in config.inc.php to a folder outside my webroot. Directory browsing was disabled from the beginning from Apache. I believe now, the system is better protected.
But my issue is, still I can not view or download the PDF files. I have tried with a previous backup (both DB and files) which I have taken before the hacker attack. But the result was same. I also restored this backup in another physical server and kept files_dir setting according to my original location (inside webroot) while troubleshooting this PDF issue, but no luck.
Please help.
What version of OJS are you using? Have you checked that the files_dir setting in config.inc.php is accurate, and that file permissions permit OJS to interact with files in that directory (and its subdirectories etc)?
Regards,
Alec Smecher
Public Knowledge Project Team
Thank you for the directions. The problem was backward slashes instead of forward slashes. When updating the files_dir setting to a outside file location from webroot, I copied the new path from windows explorer and forgot to update the direction of the slashes.
Everything seems to be alright now. Thank you very much.
Don’t put your files storage area inside your webroot, or you risk being attacked through malicious uploads! See docs/README in the “Recommended Configuration” area.
If you see a 500 error, then more information should appear in your PHP error log.
Regards,
Alec Smecher
Public Knowledge Project Team
Hi
I Upgraded to OJS 3 the lats.
I have also faced the same problem. None of the PDF files in the published issues can be viewed or downloaded.
I checked that the files_dir setting in config.inc.php is accurate, and that file permissions ( 755 ) permit OJS to interact with files in that directory (and its subdirectories etc)
I have a similar problem, if anyone could help,
I used to upload xml files in galley and pdf files as a supplementary file,
And the user interface will show a pdf button where it opens in a new window and shows the pdf in the reader,
Now it doesn’t read but can be downloaded, and shows this box,
If i click on download, it downloads the pdf normally, but it used to open the pdf in the reader itself,
The only recent thing that happened in the past few months, was that we switched servers, but other than that nothing else was changed in the configurations or anything.
We are having problems with the visualization of the pdfs but only when it is accessed from outside the university because from the internal network they are visualized well.
We are using OJS version 3.1.1.0.
We are using the latest version of the pdf.js viewer plugin
We think it could be some permission problems.
This is an older post, dealing with OJS 2, which is no longer maintained or supported by PKP. I recommend that you upgrade to the newest version of OJS, as this is likely to resolve the issue you are facing. However, if you do face the same issue following an upgrade, I would encourage you to create a new post here in the forum.
You may find the following resources helpful in preparing for and performing the upgrade:
You may need to seek professional support to upgrade your installation. This can usually be acquired from the service provider that hosts or maintains your software, such as the technical support team at your institution or a third-party hosting provider.