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)
Is the files directory publicly accessible via the web server? If so, thatâs a security hole. Make sure youâve protected your files area either by moving it out of the web root or by using a .htaccess file to restrict direct access.
What version of OJS did you upgrade from? During the upgrade, did you receive any warning messages?
Regards,
Alec Smecher
Public Knowledge Project Team
the files directory publicly is not accessible via the web server
I upgrade from version of OJS 2.8 to 3.x
How to us the .htaccess file to restrict direct access?
During the upgrade, i did not receive any warning messages.
but i still canât view or download the documents ?
If your files directory is not publicly accessible, then you donât need to worry about a .htaccess file. (If youâre curious about restricting access using .htaccess, search for âbasic authentication htaccessâ in Google.)
Check what version you upgraded from â there is no such thing as OJS 2.8.
Regards,
Alec Smecher
Public Knowledge Project Team
I have the same problem. I have upgraded from 2.4.6 to 3.0.1. the file name I have got in my files/journals/[journal_number]/articles/[article_number]/public/ is 300-1694-1-PB.pdf
Are we restricted in filenames?
Those look like OJS 2.x style filenames. The upgrade to OJS 3.x includes renaming them to OJS 3.x style. If your files didnât get renamed, but the upgrade process completed successfully, then it suggests that OJS didnât have enough permissions to rename the files. In that case you shouldâve received a warning message about each file that couldnât be renamed.
Regards,
Alec Smecher
Public Knowledge Project Team
Those are sent to the PHP error log as warnings, so depending on your PHP settings, they could go to a log file, or the browser/command line, or both.
If youâre able, Iâd suggest unpacking up a backup of your files directory and database and try running an upgrade on that to see whether it results in your files getting renamed, or warning messages.
Regards,
Alec Smecher
Public Knowledge Project Team
Thanks heaps. I did another upgrade after I changed the permission and owner of files directory and it seems to be working, although I get a couple of âWARNING: Unable to find a match forâŚâ warnings and also âInvalid argument supplied for foreachâ on line 1263 and 1273 of Upgrade.inc.php
What I had done initially was copying the exact file structure of files directory of the old version and copied into the new version which apparently wouldnât work.
Can you post the output of the upgrade process? It attempts to rename files, and if it canât, this situation will result. It should have given you warnings about e.g. file permissions during the upgrade.
Regards,
Alec Smecher
Public Knowledge Project Team
Upgrade process was successful, there was no issue during the process.
Please let me know which folder have the issue of permission, here I can see all have 755 write permission or are you talking about anything else.
I have seen all the PDF articles are existing at âpublic_html/upload/journals/2/articles/10/publicâ
Have you protected the upload directory against direct access via the web server? If not, your system may be vulnerable to malicious uploads. See e.g. docs/README.
Regards,
Alec Smecher
Public Knowledge Project Team